Y,M,D=list(map(int,input().split('/')))



if Y < 2019:

    print('Heisei')

elif Y == 2019 and M <= 4:

    print('Heisei')

else:

    print('TBD')
S=eval(input())



if S[5:7]>'04':

    print('TBD')

else:

    print('Heisei')
Y, M, D = list(map(int, input().split("/")))
if Y < 2019:
    print("Heisei")
elif Y == 2019 and M <= 4:
    print("Heisei")
else:
    print("TBD")

S = eval(input())
if S[5:7] > "04":
    print("TBD")
else:
    print("Heisei")

-Y, M, D = list(map(int, input().split("/"))) -if Y < 2019: +S = eval(input()) +if S[5:7] > "04": +    print("TBD") +else: -elif Y == 2019 and M <= 4: -    print("Heisei") -else: -    print("TBD")