s = input().split("/")
s[1] = int(s[1])
if s[1] >= 5:
    print("TBD")
else:
    print("Heisei") s = input().split("/") s input().split("/") ().split () input split "/" s[1] = int(s[1]) s[1] s 1 int(s[1]) int s[1] s 1 if s[1] >= 5:
    print("TBD")
else:
    print("Heisei") s[1] >= 5 s[1] s 1 5 print("TBD") print "TBD" print("Heisei") print "Heisei" s = input().split("/") input().split("/") s
s = input().split("/")
s[1] = int(s[1])
if s[1] >= 5:
    print("TBD")
else:
    print("Heisei")
