DA-S96-CA1-Q2

Time Limit: 5 Seconds    Memory Limit: 262144 KB

You can find the related question in the CA1.


Input

You can find the related input format in the CA1.


Output

You should print one sequence per line which is the answer to the corresponding test case.


Sample Input

1
5
1 4 5 
2 3 6 
4 7 3 
5 9 9 
7 8 8 

Sample Output

1 5 2 6 3 5 4 3 5 9 9 0 
Submit