output_description: For each test case, print the distance between the closest circles. You may
  print any number of digits after the decimal point, but the error must not
  exceed 0.00001.
input_description: The input consists of a series of test cases, followed by a single line only
  containing a single zero, which indicates the end of input.
  
  Each test case begins with a line containing an integer _N_ (2 ≤ _N_ ≤
  100000), which indicates the number of circles in the test case. _N_ lines
  describing the circles follow. Each of the _N_ lines has three decimal numbers
  _R_ , _X_ , and _Y_. R represents the radius of the circle. _X_ and _Y_
  represent the _x_ \- and _y_ -coordinates of the center of the circle,
  respectively.
attempt: def solve():
      import sys
      from itertools import combinations
  
      input_lines = sys.stdin.readlines()
      while True:
          N = int(input_lines[0])
          if N == 0:
              break
          distance = []
          for t1, t2 in combinations(input_lines[1 : N + 1], 2):
              r1, x1, y1 = map(float, t1.split())
              r2, x2, y2 = map(float, t2.split())
              d = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5 - r1 - r2
              distance.append(d)
          print(min(distance))
          del input_lines[: N + 1]
  
  
  solve()
  
problem_description: The Closest Circle
  
  You are given _N_ non-overlapping circles in xy-plane. The radius of each
  circle varies, but the radius of the largest circle is not double longer than
  that of the smallest.
  
  ![](https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_closestCircle1)
  
  Figure 1: The Sample Input
  
  The distance between two circles _C_ 1 and _C_ 2 is given by the usual formula
  
  ![](https://judgeapi.u-aizu.ac.jp/resources/images/IMAGE1_closestCircle2)
  
  where (_x i_, _y i_ ) is the coordinates of the center of the circle _C i_,
  and _r i_ is the radius of _C i_, for _i_ = 1, 2.
  
  Your task is to write a program that finds the closest pair of circles and
  print their distance.
samples: [{"input": "1.0 0.0 0.0\n    1.5 0.0 3.0\n    2.0 4.0 0.0\n    1.0 3.0 4.0\n    0", "output": ".5"}]