s = input()
a = int(s[:4])
b = int(s[5:7])
c = int(s[8:])
n = a * 10000 + b * 100 + c
if n <= 20190430:
    print("Heisei")
else:
    print("TBD") s = input() s input() input a = int(s[:4]) a int(s[:4]) int s[:4] s :4 4 b = int(s[5:7]) b int(s[5:7]) int s[5:7] s 5:7 5 7 c = int(s[8:]) c int(s[8:]) int s[8:] s 8: 8 n = a * 10000 + b * 100 + c n a * 10000 + b * 100 + c a * 10000 + b * 100 a * 10000 a 10000 b * 100 b 100 c if n <= 20190430:
    print("Heisei")
else:
    print("TBD") n <= 20190430 n 20190430 print("Heisei") print "Heisei" print("TBD") print "TBD" n = a * 10000 + b * 100 + c a * 10000 + b * 100 + c n a = int(s[:4]) int(s[:4]) a b = int(s[5:7]) int(s[5:7]) b c = int(s[8:]) int(s[8:]) c s = input() input() s
s = input()
a = int(s[:4])
b = int(s[5:7])
c = int(s[8:])
n = a * 10000 + b * 100 + c
if n <= 20190430:
    print("Heisei")
else:
    print("TBD")
