Watering Plants

No attempts yetTime limit5sMemory limit512 MB

Problem

Your greenhouse holds several potted plants that need water. The area a plant takes up is a circle, and no two plants overlap or touch each other.

You are going to buy two sprinklers. Each sprinkler waters everything inside a circle of radius RR.

One sprinkler runs in the morning and the other runs at night. A plant gets enough water only if its whole area is watered in the morning, or its whole area is watered at night. So the circle of each plant must lie completely inside one of the two circles the sprinklers water.

The position and radius of every plant are given. Find the minimum radius RR for which the two sprinklers can be placed so that every plant is watered. The sprinklers are installed on the ceiling, so a sprinkler may sit inside the area of a plant.

Input

The first line contains the number of test cases CC.

Each test case is given as follows.

  • The first line contains the number of plants NN.
  • Each of the next NN lines contains three integers XX, YY, RR. (X,Y)(X, Y) is the center of the plant and RR is its radius.

Limits

  • Every number in the input is an integer.
  • 1C101 \le C \le 10
  • 1N201 \le N \le 20
  • 1X10001 \le X \le 1000
  • 1Y10001 \le Y \le 1000
  • 1R1001 \le R \le 100
  • No two plants overlap or touch each other.

Output

For each test case, print one line of the form Case #x: R, where xx is the test case number starting from 1 and RR is the minimum sprinkler radius.

Print the radius rounded to six digits after the decimal point. When the minimum radius is 7, print 7.000000.

Notes

In the first case of the example, a sprinkler of radius 7 or more centered at (20, 15) waters the first two plants. The plant at (40, 10) is covered by a radius of 3 or more.

In the second case, one of the two sprinklers needs a radius of 8 or more. The plant at (30, 10) also has to be covered completely by one of the two sprinklers.