#!/usr/bin/env python3
import datetime

s = str(input())

year = int(s[:4])
month = int(s[5:7])
day = int(s[8:10])

a = datetime.date(year, month, day)
b = datetime.date(2019, 4, 30)

if a <= b:
    print("Heisei")
else:
    print("TBD") import datetime datetime s = str(input()) s str(input()) str input() input year = int(s[:4]) year int(s[:4]) int s[:4] s :4 4 month = int(s[5:7]) month int(s[5:7]) int s[5:7] s 5:7 5 7 day = int(s[8:10]) day int(s[8:10]) int s[8:10] s 8:10 8 10 a = datetime.date(year, month, day) a datetime.date(year, month, day) datetime.date datetime date year month day b = datetime.date(2019, 4, 30) b datetime.date(2019, 4, 30) datetime.date datetime date 2019 4 30 if a <= b:
    print("Heisei")
else:
    print("TBD") a <= b a b print("Heisei") print "Heisei" print("TBD") print "TBD" month = int(s[5:7]) int(s[5:7]) month a = datetime.date(year, month, day) datetime.date(year, month, day) a b = datetime.date(2019, 4, 30) datetime.date(2019, 4, 30) b year = int(s[:4]) int(s[:4]) year s = str(input()) str(input()) s day = int(s[8:10]) int(s[8:10]) day
#!/usr/bin/env python3
import datetime

s = str(input())

year = int(s[:4])
month = int(s[5:7])
day = int(s[8:10])

a = datetime.date(year, month, day)
b = datetime.date(2019, 4, 30)

if a <= b:
    print("Heisei")
else:
    print("TBD")
