Sorting
题号:NC52896
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 32 M,其他语言64 M
Special Judge, 64bit IO Format: %lld

题目描述

Bobo has n tuples .
He would like to find the lexicographically smallest permutation of such that for it holds that

输入描述:

The input consists of several test cases and is terminated by end-of-file.

The first line of each test case contains an integer n.
The i-th of the following n lines contains 3 integers a_i, b_i and c_i.

输出描述:

For each test case, print n integers  seperated by spaces.
DO NOT print trailing spaces.
示例1

输入

复制
2
1 1 1
1 1 2
2
1 1 2
1 1 1
3
1 3 1
2 2 1
3 1 1

输出

复制
2 1
1 2
1 2 3

备注:

* 
*
* The sum of n does not exceed .