Sebi goes to school daily with his father. They cross a big highway in the car to reach to the school. Sebi sits in front seat beside his father at driving seat. To kill boredom, they play a game of guessing speed of other cars on the highway. Sebi makes a guess of other car's speed being SG kph, his father FG kph. 

The highway is usually empty, so the drivers use cruise control, i.e. vehicles run at a constant speed. There are markers on the highway at a gap of 50 meters. Both father-son duo wants to check the accuracy of their guesses. For that, they start a timer at the instant at which their car and the other car (which speed they are guessing) are parallel to each other (they need not to be against some marker, they can be in between the markers too). After some T seconds, they observe that both the cars are next to some markers and the number of markers in between the markers of their car and the other car is D - 1 (excluding the markers next to both the cars). Also, they can observe these markers easily because the other car is faster than their. Speed of Sebi's father's car is S. Using this information, one can find the speed of the other car accurately.

An example situation when Sebi's father starts the timer. Notice that both the car's are parallel to each other.

Example situation after T seconds. The cars are next to the markers. Here the value of D is 1. The green car is Sebi's and the other car is of blue color.

Sebi's a child, he does not know how to find the check whose guess is close to the real speed of the car. He does not trust his father as he thinks that he might cheat. Can you help to resolve this issue between them by telling whose guess is closer. If Sebi's guess is better, output "SEBI". If his father's guess is better, output "FATHER". If both the guess are equally close, then output "DRAW".

-----Input-----
The first line of the input contains an integer T denoting the number of test cases. 
Each of the next T lines contain five space separated integers S, SG, FG, D, T corresponding to the Sebi's car speed, Sebi's guess, his father's guess, D as defined in the statement and the time at which both the cars at against the markers (in seconds), respectively.

-----Output-----
Output description.
For each test case, output a single line containing "SEBI", "FATHER" or "DRAW" (without quotes) denoting whose guess is better.

-----Constraints-----
- 1 ≤ T ≤ 10000
- 0 ≤ S ≤ 130
- 0 ≤ SG, FG ≤ 300
- 1 ≤ D ≤ 30
- 1 ≤ T ≤ 300
-  The other car speed doesn't exceed 300 kph.

-----Example-----
Input:
2
100 180 200 20 60
130 131 132 1 72

Output:
SEBI
FATHER

-----Explanation-----
Example case 1.
There are total 20 - 1 = 19 markers in between the Sebi's car and the other car. So, the distance between those cars at time T is 20 * 50 = 1000 meters = 1 km.
As T = 60 seconds, i.e. 1 minutes. So, the other car goes 1 km more than Sebi's car in 1 minute. So, the other car will go 60 km more than Sebi's car in 1 hour. So, its speed is 60 kmph more than Sebi's car, i.e. 160 kmph.
Sebi had made a guess of 180 kmph, while his father of 200 kmph. Other car's real speed is 160 kmph. So, Sebi's guess is better than his father. Hence he wins the game.
Example case 2.

The situation of this example is depicted in the image provided in the statement. You can find the speed of other car and see that Father's guess is more accurate.

Difficulty: MEDIUM_HARD
Tags: Mathematics

Starter code:

Solutions:
t = int(input())
for _ in range(t):
	(s, sg, fg, d, t) = map(int, input().split(' '))
	car_speed = s + d * 50 * 3.6 / t
	sebi = abs(car_speed - sg)
	fat = abs(car_speed - fg)
	if sebi < fat:
		print('SEBI')
	elif fat == sebi:
		print('DRAW')
	else:
		print('FATHER')


for i in range(int(input())):
	(S, SG, FG, D, T) = map(int, input().split())
	speed = S + D * 50 * 3.6 / T
	s = abs(speed - SG)
	f = abs(speed - FG)
	if s > f:
		print('FATHER')
	elif s < f:
		print('SEBI')
	else:
		print('DRAW')


t = int(input())
l = []
for i in range(t):
	(s, sg, fg, d, t) = map(float, input().split())
	so = d * 50 * 3.6 / t + s
	if abs(so - sg) < abs(so - fg):
		l.append('SEBI')
	elif abs(so - sg) > abs(so - fg):
		l.append('FATHER')
	else:
		l.append('DRAW')
for i in l:
	print(i)


for _ in range(int(input())):
	(S, SG, FG, D, T) = map(int, input().strip().split())
	G = S + 180 * D / T
	if abs(G - SG) > abs(G - FG):
		print('FATHER')
	elif abs(G - SG) < abs(G - FG):
		print('SEBI')
	else:
		print('DRAW')


for i in range(int(input())):
	(S, SG, FG, D, T) = map(int, input().split())
	a = 180 * D / T
	p = a + S
	if abs(FG - p) > abs(SG - p):
		print('SEBI')
	elif abs(FG - p) < abs(SG - p):
		print('FATHER')
	elif abs(p - FG) == abs(p - SG):
		print('DRAW')


t = int(input())
for i in range(t):
	(s, sg, fg, d, t) = map(int, input().split())
	a = d * 50 * 3.6 / t
	b = abs(s + a - sg)
	c = abs(s + a - fg)
	if b > c:
		print('FATHER')
	elif c > b:
		print('SEBI')
	elif b == c:
		print('DRAW')


l = []
for _ in range(int(input())):
	(a, b, c, d, e) = map(int, input().split())
	f = a + d * 180 / e
	if abs(f - b) < abs(f - c):
		l.append('SEBI')
	elif abs(f - b) > abs(f - c):
		l.append('FATHER')
	else:
		l.append('DRAW')
for i in l:
	print(i)


for _ in range(int(input())):
	(S, sg, fg, D, T) = map(float, input().split())
	speed = S + D * 50 * 3.6 / T
	s = abs(speed - sg)
	f = abs(speed - fg)
	if s > f:
		print('FATHER')
	elif s < f:
		print('SEBI')
	else:
		print('DRAW')


x = int(input())

def guess(s, sg, fg, d, t):
	sum = float(s + float(180 * d / t))
	if abs(sum - sg) > abs(sum - fg):
		return 'FATHER'
	elif abs(sum - sg) < abs(sum - fg):
		return 'SEBI'
	else:
		return 'DRAW'
for i in range(x):
	(s, sg, fg, d, t) = map(int, input().split())
	print(guess(s, sg, fg, d, t))


for i in range(int(input())):
	(s, sg, fg, d, t) = list(map(int, input().split()))
	speed = d * 180 / t + s
	sa = abs(sg - speed)
	fa = abs(fg - speed)
	if fa < sa:
		print('FATHER')
	elif fa > sa:
		print('SEBI')
	else:
		print('DRAW')


def soln(s, sg, fg, d, t):
	sp = s + 50 * 18 * d / (t * 5)
	if abs(sp - sg) == abs(sp - fg):
		return 'DRAW'
	elif abs(sp - sg) < abs(sp - fg):
		return 'SEBI'
	else:
		return 'FATHER'
for _ in range(int(input())):
	(s, sg, fg, d, t) = map(int, input().split())
	print(soln(s, sg, fg, d, t))


n = int(input())
for i in range(n):
	(S, SG, FG, D, T) = map(int, input().split())
	speed = D * 180 / T + S
	if abs(SG - speed) == abs(FG - speed):
		print('DRAW')
	elif abs(SG - speed) > abs(FG - speed):
		print('FATHER')
	else:
		print('SEBI')


for i in range(int(input())):
	(s, sg, fg, d, t) = map(int, input().split())
	s = s + d * 180 / t
	sg = abs(sg - s)
	fg = abs(fg - s)
	if fg == sg:
		print('DRAW')
	elif sg < fg:
		print('SEBI')
	else:
		print('FATHER')


for i in range(int(input())):
	(s, sg, fg, d, t) = list(map(int, input().split()))
	tot = 50 * d * 3.6 / t
	final = s + tot
	a = abs(sg - final)
	b = abs(fg - final)
	if a < b:
		print('SEBI')
	elif a > b:
		print('FATHER')
	else:
		print('DRAW')


t = int(input())
for _ in range(t):
	(S, SG, FG, D, T) = map(int, input().split())
	S_other = S + 180 * D / T
	fatherError = abs(FG - S_other)
	sonError = abs(SG - S_other)
	if sonError == fatherError:
		print('DRAW')
	elif sonError < fatherError:
		print('SEBI')
	else:
		print('FATHER')


TestNumbers = input()
counter = 1
while counter <= int(TestNumbers):
	(S, SG, FG, D, T) = map(int, input().split())
	OCS = S + D * 180 / T
	SGR = abs(SG - OCS)
	FGR = abs(FG - OCS)
	if SGR < FGR:
		print('SEBI')
	elif FGR < SGR:
		print('FATHER')
	else:
		print('DRAW')
	counter += 1


T = int(input())
for tc in range(T):
	(S, SG, FG, D, T) = map(int, input().split())
	Vact = S + D * 180 / T
	AccuS = abs(Vact - SG)
	AccuF = abs(Vact - FG)
	if AccuS == AccuF:
		print('DRAW')
	elif AccuS < AccuF:
		print('SEBI')
	else:
		print('FATHER')


t = int(input())
for _ in range(t):
	(s, sg, fg, d, t) = [int(x) for x in input().split()]
	d = d * 50
	speed = d * 18 / (t * 5) + s
	sg = abs(sg - speed)
	fg = abs(fg - speed)
	if sg < fg:
		print('SEBI')
	elif sg == fg:
		print('DRAW')
	else:
		print('FATHER')


for _ in range(int(input())):
	(s, sg, fg, d, t) = map(int, input().split())
	espd = d * 50 * (18 / 5) / t
	ospd = s + espd
	a = abs(ospd - sg)
	b = abs(ospd - fg)
	if a == b:
		print('DRAW')
	elif a < b:
		print('SEBI')
	elif a > b:
		print('FATHER')


for i in range(int(input())):
	(s, sg, fg, d, t) = [int(i) for i in input().split()]
	dis = d * 50
	speed = dis / t
	exs = speed * 18 / 5
	ts = s + exs
	ss = abs(sg - ts)
	sf = abs(fg - ts)
	if ss > sf:
		print('FATHER')
	elif ss < sf:
		print('SEBI')
	elif ss == sf:
		print('DRAW')


from math import *
import sys

def input():
	return sys.stdin.readline().replace('\n', '').strip()
sys.setrecursionlimit(10 ** 9)
for _ in range(int(input())):
	(s, sg, fg, d, t) = list(map(int, input().split()))
	v = s + d * 180 / t
	if abs(sg - v) == abs(fg - v):
		print('DRAW')
	elif abs(sg - v) > abs(fg - v):
		print('FATHER')
	else:
		print('SEBI')


for i in range(int(input())):
	(s, sg, fg, d, t) = map(int, input().split())
	d = d * 50
	ans = d * 18 / (t * 5) + s
	sg = abs(sg - ans)
	fg = abs(fg - ans)
	if sg < fg:
		print('SEBI')
	elif sg == fg:
		print('DRAW')
	else:
		print('FATHER')


T = int(input())
for _ in range(T):
	(a, b, c, d, e) = map(int, input().split())
	s = 180 * d / e
	s += a
	a1 = abs(s - b)
	a2 = abs(s - c)
	if a1 > a2:
		print('FATHER')
	elif a2 > a1:
		print('SEBI')
	else:
		print('DRAW')


tests = int(input())
for _ in range(tests):
	(s, sg, fg, d, t) = [int(j) for j in input().split()]
	speed = s + 180 * d / t
	abs_s = abs(sg - speed)
	abs_f = abs(fg - speed)
	if abs_s < abs_f:
		print('SEBI')
	elif abs_f < abs_s:
		print('FATHER')
	else:
		print('DRAW')


t = int(input())
for i in range(0, t):
	(S, SG, FG, D, T) = map(float, input().split())
	x = 180 * D / T + S
	if abs(SG - x) == abs(FG - x):
		print('DRAW')
	elif abs(SG - x) > abs(FG - x):
		print('FATHER')
	else:
		print('SEBI')


for _ in range(int(input())):
	(s, sg, fg, d, t) = list(map(int, input().split()))
	sum = 50 * d * 3.6 / t
	a = abs(sg - (s + sum))
	b = abs(fg - (s + sum))
	if a > b:
		print('FATHER')
	elif a < b:
		print('SEBI')
	else:
		print('DRAW')


def calc():
	[s, sg, fg, d, t] = [int(x) for x in input().split()]
	v = s + 180 * d / t
	son = abs(sg - v)
	father = abs(fg - v)
	if son < father:
		print('SEBI')
	elif father < son:
		print('FATHER')
	else:
		print('DRAW')
for index in range(0, int(input())):
	calc()


for _ in range(int(input())):
	(S, SG, FG, D, T) = [int(x) for x in input().split()]
	dis = D * 180 / T + S
	sebi = abs(dis - SG)
	fath = abs(dis - FG)
	if sebi < fath:
		print('SEBI')
	elif sebi == fath:
		print('DRAW')
	else:
		print('FATHER')


t = int(input())
for i in range(t):
	(s, g, f, d, w) = map(int, input().split())
	dis = d * 180 / w + s
	sebi = abs(dis - g)
	fath = abs(dis - f)
	if sebi < fath:
		print('SEBI')
	elif sebi == fath:
		print('DRAW')
	else:
		print('FATHER')


from sys import stdin, stdout
import math
from collections import Counter
import functools
import time
import bisect

def tr():
	return range(int(line()))

def sm():
	return map(int, line().split())

def ln():
	return list(sm())

def nl():
	return int(line())

def ssm():
	return map(str, line().split())

def line():
	return stdin.readline().rstrip()

def b(x):
	return bin(x).replace('0b', '')

def o(x):
	if type(x) != type(''):
		x = str(x)
	stdout.write(x + '\n')

def osp(x):
	if type(x) != type(''):
		x = str(x)
	stdout.write(x + ' ')

def ol(x):
	stdout.write(' '.join(map(str, x)))

def wline():
	return stdin.read().split()

def main():
	for _ in tr():
		(s, sg, fg, d, t) = sm()
		temp = d * 50 * 60 * 60 / (t * 1000)
		speed = temp + s
		if abs(sg - speed) < abs(fg - speed):
			print('SEBI')
		elif abs(sg - speed) > abs(fg - speed):
			print('FATHER')
		else:
			print('DRAW')
main()


for _ in range(int(input())):
	(s, sg, fg, d, t) = map(int, input().split())
	dif = float(d * 180 / t)
	diff = float(s) + dif
	if abs(float(diff - sg)) > abs(float(diff - fg)):
		print('FATHER')
	elif abs(float(diff - sg)) < abs(float(diff - fg)):
		print('SEBI')
	else:
		print('DRAW')


for _ in range(int(input())):
	(s, sg, fg, d, t) = map(int, input().split())
	dis = d * 50 / 1000
	t1 = t / 60
	speed = d * 50 * 60 * 60 / (t * 1000)
	speed += s
	if abs(speed - sg) > abs(speed - fg):
		print('FATHER')
	elif abs(speed - sg) < abs(speed - fg):
		print('SEBI')
	else:
		print('DRAW')


for _ in range(int(input())):
	(S, SG, FG, D, T) = map(int, input().split())
	rel_speed = D * 50 * 3600 / (T * 1000)
	abs_speed = rel_speed + S
	SG_diff = abs(SG - abs_speed)
	FG_diff = abs(FG - abs_speed)
	if SG_diff > FG_diff:
		print('FATHER')
	elif SG_diff < FG_diff:
		print('SEBI')
	else:
		print('DRAW')


import math

def solve():
	real_speed = S + D * 180 / T
	serbia_diff = abs(real_speed - SG)
	father_diff = abs(real_speed - FG)
	if serbia_diff == father_diff:
		print('DRAW')
	elif serbia_diff < father_diff:
		print('SEBI')
	else:
		print('FATHER')
t = int(input())
for _ in range(t):
	(S, SG, FG, D, T) = list(map(int, input().split()))
	solve()


for _ in range(int(input())):
	(S, SG, FG, D, T) = [int(s) for s in input().split()]
	S += D * 50 * 3.6 / T
	Sebi = abs(S - SG)
	Father = abs(S - FG)
	if Sebi == Father:
		print('DRAW')
	elif Sebi < Father:
		print('SEBI')
	else:
		print('FATHER')


from sys import stdin, stdout
ans = []
for _ in range(int(stdin.readline())):
	(spd, sg, fg, d, time) = map(int, stdin.readline().split())
	ckh = d * 180 / time + spd
	dsg = abs(ckh - sg)
	dfg = abs(ckh - fg)
	ans.append('DRAW' if dsg == dfg else 'SEBI' if dsg < dfg else 'FATHER')
stdout.write('\n'.join(ans))


for _ in range(int(input())):
	(a, b, c, d, e) = map(int, input().split())
	f = a + d * 50 * 3600 / (1000 * e)
	if abs(f - b) < abs(f - c):
		print('SEBI')
	elif abs(f - b) > abs(f - c):
		print('FATHER')
	else:
		print('DRAW')


for _ in range(int(input())):
	(s, sg, f, d, t) = map(int, input().split())
	a = 180 * d / t + s
	if abs(sg - a) > abs(f - a):
		print('FATHER')
	elif abs(sg - a) < abs(f - a):
		print('SEBI')
	else:
		print('DRAW')