s=input()
if int(s[0:4])<2019:
    print("Heisei")
elif int(s[0:4])>2019:
    print("TBD")
else:
    if int(s[5])==1 or int(s[6])>4:
        print("TBD")
    elif int(s[6])<=4:
        print("Heisei") s=input() s input() input if int(s[0:4])<2019:
    print("Heisei")
elif int(s[0:4])>2019:
    print("TBD")
else:
    if int(s[5])==1 or int(s[6])>4:
        print("TBD")
    elif int(s[6])<=4:
        print("Heisei") int(s[0:4])<2019 int(s[0:4]) int s[0:4] s 0:4 0 4 2019 print("Heisei") print "Heisei" elif int(s[0:4])>2019:
    print("TBD") int(s[0:4])>2019 int(s[0:4]) int s[0:4] s 0:4 0 4 2019 print("TBD") print "TBD" if int(s[5])==1 or int(s[6])>4:
        print("TBD")
    elif int(s[6])<=4:
        print("Heisei") int(s[5])==1 or int(s[6])>4 int(s[5])==1 int(s[5]) int s[5] s 5 1 int(s[6])>4 int(s[6]) int s[6] s 6 4 print("TBD") print "TBD" elif int(s[6])<=4:
        print("Heisei") int(s[6])<=4 int(s[6]) int s[6] s 6 4 print("Heisei") print "Heisei" s=input() input() s
s=input()
if int(s[0:4])<2019:
    print("Heisei")
elif int(s[0:4])>2019:
    print("TBD")
else:
    if int(s[5])==1 or int(s[6])>4:
        print("TBD")
    elif int(s[6])<=4:
        print("Heisei")