Codeforces Beta Round 71


A. Bus Game
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2 2
Output
Ciel
Input
3 22
Output
Hanako
----------------------------------------------------------------------------------------------------
B. Colorful Field
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4 5 5 6
4 3
1 3
3 3
2 5
3 2
1 3
1 4
2 3
2 4
1 1
1 1
Output
Waste
Grapes
Carrots
Kiwis
Carrots
Carrots
----------------------------------------------------------------------------------------------------
C. Beaver
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
Go_straight_along_this_street
5
str
long
tree
biginteger
ellipse
Output
12 4
Input
IhaveNoIdea
9
I
h
a
v
e
N
o
I
d
Output
0 0
Input
unagioisii
2
ioi
unagi
Output
5 5
----------------------------------------------------------------------------------------------------
D. Password
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
10 8 2
1 2 3 5 6 7 8 9
3 5
Output
2
Input
3 2 1
1 2
3
Output
-1
----------------------------------------------------------------------------------------------------
E. Security System
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5 25 2 4 1
Output
RRUURURU
Input
3 6 1 2 2
Output
URUR
Input
3 5 1 2 2
Output
Impossible
Input
20 492 11 4 8
Output
RRRRRRRRRRRRRRRRUUUUURUUUUURRUUUUUUUUU
----------------------------------------------------------------------------------------------------
