S = input()

if int(S[0:4]) <= 2019 and int(S[5:7]) <= 4 and int(S[8:10]) <= 30:
    print("Heisei")
else:
    print("TBD") S = input() S input() input if int(S[0:4]) <= 2019 and int(S[5:7]) <= 4 and int(S[8:10]) <= 30:
    print("Heisei")
else:
    print("TBD") int(S[0:4]) <= 2019 and int(S[5:7]) <= 4 and int(S[8:10]) <= 30 int(S[0:4]) <= 2019 and int(S[5:7]) <= 4 int(S[0:4]) <= 2019 int(S[0:4]) int S[0:4] S 0:4 0 4 2019 int(S[5:7]) <= 4 int(S[5:7]) int S[5:7] S 5:7 5 7 4 int(S[8:10]) <= 30 int(S[8:10]) int S[8:10] S 8:10 8 10 30 print("Heisei") print "Heisei" print("TBD") print "TBD" S = input() input() S
S = input()

if int(S[0:4]) <= 2019 and int(S[5:7]) <= 4 and int(S[8:10]) <= 30:
    print("Heisei")
else:
    print("TBD")