H. Cooking Timer
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Timmy really likes observing the $$$N$$$ analog cooking clocks on the wall. Each of the $$$N$$$ analog clocks has three hands: hours $$$h(0\leq h \lt 24)$$$, minutes $$$m(0\leq m \lt 60)$$$, and seconds $$$s(0\leq s \lt 60)$$$. For each of the $$$N$$$ clocks, Timmy will say what the minimum angular difference between any two hands is, in degrees. Your job is to predict what Timmy will say.

Input

The first line will contain $$$N (1\leq N\leq 10^5)$$$, the number of analog clocks. Each of the following $$$N$$$ lines will contain three integers: $$$h, m, s$$$, the current hour, minute, and second, respectively, shown on the clock.

Output

On every new line, print the degrees of the minimum angular difference between any two hands. Your answer will be treated as correct up to a difference of $$$10^{-6}$$$.

Example
Input
5
12 0 0
1 2 3
2 3 4
3 4 5
4 5 6
Output
0
5.7
5.6
5.5
5.4