This is a problem of Euclidean Geometry. See the figure below.
Your task is as follows: given the lengths of segments b, c, and d, calculate the length of segment a.
The input begins with the number t of test cases in a single line (t<=300). In each of the next t lines there are three integers b, c and d (0 <= b, c and d <= 10200 ; b,d < c) separated by a space.
For every test case print the length of the segment a, one number per line.
Input: 2 3 8 5 10 18 12 Output: 8 14