Codeforces Round 563 (Div. 2)


A. Ehab Fails to Be Thanos
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
1 2 2 1 3 1
Output
2 1 3 1 1 2
Input
1
1 1
Output
-1
----------------------------------------------------------------------------------------------------
B. Ehab Is an Odd Person
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3
4 1 7
Output
1 4 7 
Input
2
1 1
Output
1 1 
----------------------------------------------------------------------------------------------------
C. Ehab and a Special Coloring Problem
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
Output
1 2 1 
Input
3
Output
2 1
----------------------------------------------------------------------------------------------------
D. Ehab and the Expected XOR Problem
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
3 5
Output
3
6 1 3
Input
2 4
Output
3
1 3 1 
Input
1 1
Output
0
----------------------------------------------------------------------------------------------------
E. Ehab and the Expected GCD Problem
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
Output
1
Input
3
Output
4
Input
6
Output
120
----------------------------------------------------------------------------------------------------
F. Ehab and the Big Finale
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
1 2
1 3
3 4
3 5
3
5
Output
d 2
s 3
! 5
----------------------------------------------------------------------------------------------------
