The Laurel-Hardy Story#1507

The Laurel-Hardy Story

1 second
128 megabytes
Hard
prb1507

Laurel and Hardy are two famous movie characters from the 50's. They are well known for their difference in weight, as you can see in the picture. In case you don't know them, Laurel is the lighter one. In their youth, Laurel and Hardy used to play with a strange seesaw, and when the seesaw was in a balanced position, Hardy was always closer to the ground. We will now examine a two-dimensional version of their seesaw.

The seesaw Laurel and Hardy used can be considered as part of a circle of radius , as shown in the picture (the seesaw is filled gray and shaped like a letter D). Hardy sits at point B (the rightmost point of the seesaw), and Laurel at point A (the leftmost point of segment AB). d = EF is the distance between the midpoint of the segment AB and the midpoint of the arc AFB. That is, E is the midpoint of AB, and F is the midpoint of arc AFB. MN is the ground, a horizontal line. BD = h_1 is the distance from Hardy to the ground. Your task is to find the distance from Laurel to the ground (denoted as h_2 = AC).

prb1507-2-en

Input

The first line contains an integer (0 < n \leq 1000), the number of tests. Each of the next lines describes one test case in the following format:

Each line contains three integers (10 \leq r \leq 100), (5 \leq d \leq r), and h_1 (5 \leq h_1 \leq d). The meanings of these numbers are described above.

Output

For each test, output a line containing its number and the value of h_2, a real number rounded to four decimal places. The output format is shown in the example.

Examples

Example 1

Loading
Loading