S=list(input())
if int(S[0]+S[1]+S[2]+S[3])==2019:
    if int(S[5]+S[6])<=4:
        print("Heisei")
    else:
        print("TBD") S=list(input()) S list(input()) list input() input if int(S[0]+S[1]+S[2]+S[3])==2019:
    if int(S[5]+S[6])<=4:
        print("Heisei")
    else:
        print("TBD") int(S[0]+S[1]+S[2]+S[3])==2019 int(S[0]+S[1]+S[2]+S[3]) int S[0]+S[1]+S[2]+S[3] S[0]+S[1]+S[2] S[0]+S[1] S[0] S 0 S[1] S 1 S[2] S 2 S[3] S 3 2019 if int(S[5]+S[6])<=4:
        print("Heisei")
    else:
        print("TBD") int(S[5]+S[6])<=4 int(S[5]+S[6]) int S[5]+S[6] S[5] S 5 S[6] S 6 4 print("Heisei") print "Heisei" print("TBD") print "TBD" S=list(input()) list(input()) S
S=list(input())
if int(S[0]+S[1]+S[2]+S[3])==2019:
    if int(S[5]+S[6])<=4:
        print("Heisei")
    else:
        print("TBD")