s = input()
if int(s[5]) != 0:
    print("TBD")
else:
    if int(s[6]) >= 5:
        print("TBD")
    else:
        print("Heisei") s = input() s input() input if int(s[5]) != 0:
    print("TBD")
else:
    if int(s[6]) >= 5:
        print("TBD")
    else:
        print("Heisei") int(s[5]) != 0 int(s[5]) int s[5] s 5 0 print("TBD") print "TBD" if int(s[6]) >= 5:
        print("TBD")
    else:
        print("Heisei") int(s[6]) >= 5 int(s[6]) int s[6] s 6 5 print("TBD") print "TBD" print("Heisei") print "Heisei" s = input() input() s
s = input()
if int(s[5]) != 0:
    print("TBD")
else:
    if int(s[6]) >= 5:
        print("TBD")
    else:
        print("Heisei")