PROGRAMMING:A sort
###Title Description:
Now there are many rectangles. Each rectangle has a number, which can be repeated; We also know that the width, length, number and width of the rectangle are integers; Now it is required to sort in the following way (the default sort rule is from small to large);
1. Sort according to the number from small to large
2. For rectangles with equal numbers, they are sorted according to their length;
3. If the number and length are the same, sort by the width of the rectangle;
4. If the number, length and width are the same, only one rectangle is reserved for sorting, and the redundant rectangle is deleted; Finally, all rectangles are displayed in the specified format;
###Input Description:
The first line has an integer 0 < n < 10000, which means that there are n groups of test data next; The first line of each group has an integer 0 < m < 1000, which means there are m rectangles; In the next M-line, each line has three numbers. The first number represents the number of the rectangle. The second and third numbers with large values represent the length, and the small number represents the width. The equality indicates that this is a square (the length, width and number of the data are less than 10000);
###Output Description:
Output the number length and width of all qualified rectangles of each group of data in sequence
###Sample input:
```in
one
eight
1 1 1
1 1 1
1 1 2
1 2 1
1 2 2
2 1 1
2 1 2
2 2 1
```
###Sample output:
```out
1 1 1
1 2 1
1 2 2
2 1 1
2 2 1
```
###Title Source
This topic is selected from nyoj website, online address: http://nyoj.top/problem/8
answer:If there is no answer, please comment
Now there are many rectangles. Each rectangle has a number, which can be repeated; We also know that the width, length, number and width of the rectangle are integers; Now it is required to sort in the following way (the default sort rule is from small to large);
1. Sort according to the number from small to large
2. For rectangles with equal numbers, they are sorted according to their length;
3. If the number and length are the same, sort by the width of the rectangle;
4. If the number, length and width are the same, only one rectangle is reserved for sorting, and the redundant rectangle is deleted; Finally, all rectangles are displayed in the specified format;
###Input Description:
The first line has an integer 0 < n < 10000, which means that there are n groups of test data next; The first line of each group has an integer 0 < m < 1000, which means there are m rectangles; In the next M-line, each line has three numbers. The first number represents the number of the rectangle. The second and third numbers with large values represent the length, and the small number represents the width. The equality indicates that this is a square (the length, width and number of the data are less than 10000);
###Output Description:
Output the number length and width of all qualified rectangles of each group of data in sequence
###Sample input:
```in
one
eight
1 1 1
1 1 1
1 1 2
1 2 1
1 2 2
2 1 1
2 1 2
2 2 1
```
###Sample output:
```out
1 1 1
1 2 1
1 2 2
2 1 1
2 2 1
```
###Title Source
This topic is selected from nyoj website, online address: http://nyoj.top/problem/8
answer:If there is no answer, please comment