You are have been given the job of forming quiz teams for the next ' MCA CPCI quiz '. There Are2*n students interested to participate and your have to form N teams, the each team consisting the two members. Since the members of the have to practice together and all the students want the their member's house as near. Let X1 is the distance between the houses of group 1, x2 be the distance between the houses of Group 2 and. You are X2 have to make sure the summation (x1 + x3 + xn + ... + minimized) is.
Input
There is many cases in the input file. Each case is starts with an integer N (n≤8). The next 2*nlines would given the information of the students. Each line starts with the student ' s name, followed by Thex coordinate and then the Y coordinate. Both x, y are integers in the range 0 to 1000. Students name would consist of lowercase letters only and the length would be at most 20.
The Input is terminated by a case where N is equal to 0.
Output
For each case, output is followed by the summation of the distances and rounded to 2 decimal places. Follow the sample for exact format.