Testing Round 7


A. Black-and-White Cube
time limit per test: 0.5 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
1
Output
-1
Input
2
Output
bb
ww
bb
ww
----------------------------------------------------------------------------------------------------
B. Tournament-graph
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
Output
0 1 0
0 0 1
1 0 0
Input
4
Output
-1
----------------------------------------------------------------------------------------------------
C. Two permutations
time limit per test: 6 seconds
memory limit per test: 512 megabytes
input: standard input
output: standard output

Examples
Input
3
3 1 2
3 2 1
1
1 2 3 3
Output
1
Input
4
4 3 2 1
2 3 4 1
3
1 2 3 4
1 3 2 1
1 4 2 3
Output
1
1
2
----------------------------------------------------------------------------------------------------
