The Deadly Olympic Returns!!! 

\epsfbox{p10794.eps}

It is now 10000 AD. In this problem we will talk about the resumption of a World wide gaming festival named Olympic, which used to take place long ago in the twentieth century. The game of Olympic upheld the desire for peace (missing now a days), friendship and many other good things among nations. But it itself was also a contest a desire to win, a desire to outplay the opponent. As time has passed by, man has become more aggressive or cruel for success. So the newly formed International Olympic Committee (IOC) has decided to encourage such desires by including wrestling like game which had its origin some 9,000 years ago from today and its brutality enjoyed the patronage of many royal houses. But IOC has introduced some technological changes in the game. They have decided to follow the format of dogfight used in war. Both the opponents will bring their best possible aircrafts (provided by their own country's air force) loaded with missiles. At some point one of them will throw a missile to another player. At the same time the other player will also throw a missile to stop the opponent's one. If both of them survive, the game will continue. The commentators want to predict the result of the game (as they always do) before it happens. So, they are aided with a computer to calculate the minimum possible distance between the thrown missiles. You are appointed to write the necessary program for it.

To make things easier, it is assumed that the missiles used here always travel in a straight line until they are hindered by another missile. Here all positions are considered in three-dimensional space. You can ignore any effect of the existence of the aircrafts.

Input 

Input starts with an integer T ( 1$ \le$T$ \le$500) denoting the number of test cases to follow. Each test case has three lines. First line has a positive integer time. Second line of a test case has six integers x1, y1, z1, x2, y2, z2. (x1, y1, z1) is the current position of the first player from where he throws the missile and (x2, y2, z2) is the position of the missile after time seconds. The third line contains the same set of information for the second contestant. All values are less than 10000.

Output 

There should be one line of output for each test case. At first print `Case i: ' (without the quotes) where i is an integer denoting the i-th test case starting from one. Then print the minimum possible distance between the two missiles in the same line with four digits after the decimal point. See the sample output below for exact formatting.

Sample Input 

2
1
0 0 0 1 0 0
0 -1 0 0 -2 0
4
0 0 0 1 0 0
-1 0 0 -2 0 0

Sample Output 

Case 1: 1.0000
Case 2: 1.0000



Problem setter: Mohammad Sajjad Hossain
Special Thanks: Shahriar Manzoor

Miguel Revilla 2004-12-10