Lord Bradley on the North Pole
A polar dawn is rising. Lord Bradley is standing precisely on the North Pole, facing the direction of his distant home at Greenwich. From throughout the whole Earth, angry polar bears are coming to seek revenge on him. Lord Bradley has only his good, faithful rifle. He never misses, and can take a shot (or any number of shots) in negligible time. The rifle has exceptional range - it can hit a target all the way up to the South Pole.
The only problem is changing the shot direction: to keep his perfect concentration, Lord Bradley always turns at the speed of one arcsecond (1" = 1/3600 * 1°) per one "time" second. Will he manage to shoot all the bears, or will he become their breakfast?
Suppose that Earth is perfectly spherical, its circumference is exactly 40 320 km, and all the bears are running straight at Bradley, with constant speed of 28 km/h. A bear can be shot even at point-blank range (at the very moment of entering the North Pole), however, shot direction in such a case should still be the direction the bear is approaching from. Given the initial geographic coordinates of all the bears, determine whether Lord Bradley survives this peril.
Input
The first line contains the number t of test cases. The test cases follow.
The first line of each test case contains a single integer n - the number of bears (1 ≤ n ≤ 1 000). In the next n lines, the bears' coordinates are given (latitude and longitude, using * for degrees, ' for minutes and " for seconds, as in the Examples section). None of the degrees, minutes and seconds can be omitted. All the numbers are nonnegative integers. As usual, N stands for nortern hemisphere and S for southern one, E for bears to the East of Greenwich and W for bears to the West.
Output
For each test case, your program should write a single line containing a single word: ALIVE if Bradley can defeat the bears, or EATEN otherwise.