X = 10 ** 100 for _ in range(int(input())): A, B, D, R = map(int, input().split()) def calc(x: int): n = (x + A - 1) // A res = n res += ((n - 1) * D + R - 1) // R return res t1 = calc(B * X) t2 = calc(B * X + 1) print("rabbit" if t2 < X else "tie" if t1 < X else "turtle")