S = list(input())
y = 1000*int(S[0])+100*int(S[1])+10*int(S[2])+int(S[3])
m = 10*int(S[5])+int(S[6])
d = 10*int(S[8])+int(S[9])

if y < 2019 :
    print("Heisei")
elif y == 2019 and m <= 4 :
    print("Heisei")
else :
    print("TBD") S = list(input()) S list(input()) list input() input y = 1000*int(S[0])+100*int(S[1])+10*int(S[2])+int(S[3]) y 1000*int(S[0])+100*int(S[1])+10*int(S[2])+int(S[3]) 1000*int(S[0])+100*int(S[1])+10*int(S[2]) 1000*int(S[0])+100*int(S[1]) 1000*int(S[0]) 1000 int(S[0]) int S[0] S 0 100*int(S[1]) 100 int(S[1]) int S[1] S 1 10*int(S[2]) 10 int(S[2]) int S[2] S 2 int(S[3]) int S[3] S 3 m = 10*int(S[5])+int(S[6]) m 10*int(S[5])+int(S[6]) 10*int(S[5]) 10 int(S[5]) int S[5] S 5 int(S[6]) int S[6] S 6 d = 10*int(S[8])+int(S[9]) d 10*int(S[8])+int(S[9]) 10*int(S[8]) 10 int(S[8]) int S[8] S 8 int(S[9]) int S[9] S 9 if y < 2019 :
    print("Heisei")
elif y == 2019 and m <= 4 :
    print("Heisei")
else :
    print("TBD") y < 2019 y 2019 print("Heisei") print "Heisei" elif y == 2019 and m <= 4 :
    print("Heisei") y == 2019 and m <= 4 y == 2019 y 2019 m <= 4 m 4 print("Heisei") print "Heisei" print("TBD") print "TBD" m = 10*int(S[5])+int(S[6]) 10*int(S[5])+int(S[6]) m d = 10*int(S[8])+int(S[9]) 10*int(S[8])+int(S[9]) d y = 1000*int(S[0])+100*int(S[1])+10*int(S[2])+int(S[3]) 1000*int(S[0])+100*int(S[1])+10*int(S[2])+int(S[3]) y S = list(input()) list(input()) S
S = list(input())
y = 1000*int(S[0])+100*int(S[1])+10*int(S[2])+int(S[3])
m = 10*int(S[5])+int(S[6])
d = 10*int(S[8])+int(S[9])

if y < 2019 :
    print("Heisei")
elif y == 2019 and m <= 4 :
    print("Heisei")
else :
    print("TBD")
