B. Permutation Recovery
time limit per test
1 second
memory limit per test
512 megabytes
input
standard input
output
standard output

Vladislav invented a new algorithm of the distributed key construction.

The distributed key consists of 2n numerical sequences of length n. To construct the key Vladislav gets some permutation p of length n2. Next step is to put the elements of p into a square matrix a. The first n elements of p form the first row of a, next n elements form the second row, etc. Finally, 2n numerical sequences of the distributed key are rows and columns of the matrix a.

These 2n sequences were given to Vladislav in some arbitrary order. He spent a while trying to come up with an algorithm for recovering the permutation. Try to restore the permutation before the end of the round!

Input

The first input line contains one integer n (1 ≤ n ≤ 100).

Each of the next 2n lines contains n integers from 1 to n2, rows and columns of the matrix a in some order.

It is guaranteed that the input is correct, there is at least one suitable permutation p.

Output

Print a permutation p of integers from 1 to n2.

Examples
Input
2
1 2
1 3
2 4
3 4
Output
1 2 3 4
Input
4
1 6 14 7
5 4 1 13
13 16 12 10
8 3 6 16
11 2 7 10
15 9 14 12
4 3 9 2
5 8 15 11
Output
5 4 1 13 8 3 6 16 15 9 14 12 11 2 7 10