Test Case for Question #4 in DWITE 2012-2013 High School Round 2
Contest: DWITE 2012-2013 High School Round 2
Question: #4
Input File: DATA4.txt
Output File: OUT4.txt
Input
1
1
10
1 2 7 4 2 2 3 1 0 0
10
8 0 7 1 3 0 2 0 1 0
10
7 1 1 6 5 0 2 0 0 0
4
1 0 0 0
Output
IMPOSSIBLE
9 7 1 4 6 5 2 8 10 3
2 10 1 8 5 9 4 7 3 6
3 9 8 1 2 10 5 7 6 4
3 4 2 1