Given a list of a convex polygon's vertices (as integer x and y pairs), but in no particular order, order them as they would be walking the polygon clockwise. Start with the left-most (x) vertex (and bottom-most of the left-most, if there is more than one). You may assume no three vertices of the polygon are colinear, each polygon has at least three vertices, and no vertex is repeated in the list.
The first line of the input is a single integer (T) which specifies how many test cases (convex polygons) follow. T is between 1 and 1,000, inclusive. The following lines are the test cases, each representing a polygon. The first line of a test case is a single integer (n) which states how many vertices the polygon has. Then n lines follow, one for each vertex, each with two integers representing the x and the y coördinates of the vertex.
Each coördinate integer is between 0 and 10,000, inclusive. Each polynomial has at most 50 vertices, and at least 3 vertices.
The output should be exactly the same format as the input, except the lines representing the vertices of each polygon should be appropriately reordered.
4 3 2 1 1 1 1 2 3 12 7 0 0 9 5 3 419 7 342 101 4 183 5 100 97 0 0 258 11 291 23 293 64
4 3 1 1 1 2 2 1 3 0 0 12 7 9 5 3 4 183 342 101 419 7 5 0 0 100 97 293 64 291 23 258 11