# cook your dish here

import math

T = int(input('Enter the no. of testcases: '))

for i in range(1, T+1):

finish = int(input("Enter finish distance: "))

distancetoBolt = int(input("Enter bolt distance: "))

tigerAcceleration = int(input("Enter tigeracceleration: "))

boltSpeed = int(input("Enter speed of bolt: "))

time_for_bolt = finish/boltSpeed

tiger_distance = distancetoBolt + finish

time_for_tiger = math.sqrt((tiger_distance/tigerAcceleration)*2)

if time_for_bolt == time_for_tiger:

print(‘Tiger’)

elif time_for_bolt > time_for_tiger:

print(‘Tiger’)

else :

print(‘Bolt’)