Marnie knows that the real money is in franchising, so she's hired you to write a program to find left-only routes for her franchisees who work on similarly shaped lakes.
Input Each run of your program will handle the problem for a single lake. The data are specified as follows:
There will be at most 1000 customers on a lake. No coordinate will have absolute value greater than 10000. Whitespace separates integers, so two consecutive vertices may appear on the same line, or a newline may separate the x and y coordinates of a vertex, etcetera. Output: Output the coordinates of customers in an order so that only left turns are made from one customer to the next, and the return trip from the last customer to the home base is a left turn as well. There will always be such an order; in particular, no three customers lie on the same straight line. The franchisee's base counts as a customer site and always has coordinates 0 0; it should be listed first and only once.
5 0 0 2 1 0 1 1 2 2 0Corresponding sample output:
0 0 2 0 2 1 1 2 0 1