A. Alien Gordon Ramsey
time limit per test
1.2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output
Example
Input
1
6
3 4
1 3
2 3
5 4
6 4
Output
4
1 4 2 3 4 1