Codeforces Round 561 (Div. 2)


A. Silent Classroom
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
jorge
jose
oscar
jerry
Output
1
Input
7
kambei
gorobei
shichiroji
kyuzo
heihachi
katsushiro
kikuchiyo
Output
2
Input
5
mike
mike
mike
mike
mike
Output
4
----------------------------------------------------------------------------------------------------
B. All the Vowels Please
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
7
Output
-1
Input
36
Output
agoeuioaeiruuimaeoieauoweouoiaouimae
----------------------------------------------------------------------------------------------------
C. A Tale of Two Lands
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
2 5 -3
Output
2
Input
2
3 6
Output
1
----------------------------------------------------------------------------------------------------
D. Cute Sequences
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
5 26 2
3 9 1
Output
4 5 6 13 26
-1
----------------------------------------------------------------------------------------------------
E. The LCMs Must be Large
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 5
3 1 2 3
3 3 4 5
Output
possible
Input
10 10
1 1
1 2
1 3
1 4
1 5
1 6
1 7
1 8
1 9
1 10
Output
impossible
----------------------------------------------------------------------------------------------------
F. Vicky's Delivery Service
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 3 2 4
1 2 1
2 3 1
3 4 2
? 1 4
? 4 1
+ 3 1 2
? 4 1
Output
Yes
No
Yes
----------------------------------------------------------------------------------------------------
