import datetime

s=input()

s_date = datetime.datetime.strptime(s, '%Y/%m/%d')

last_date = '2019/05/01'

t_date = datetime.datetime.strptime(last_date, '%Y/%m/%d')

if s_date < t_date:
    print('Heisei')

else:
    print('TBD') import datetime datetime s=input() s input() input s_date = datetime.datetime.strptime(s, '%Y/%m/%d') s_date datetime.datetime.strptime(s, '%Y/%m/%d') datetime.datetime.strptime datetime.datetime datetime datetime strptime s '%Y/%m/%d' last_date = '2019/05/01' last_date '2019/05/01' t_date = datetime.datetime.strptime(last_date, '%Y/%m/%d') t_date datetime.datetime.strptime(last_date, '%Y/%m/%d') datetime.datetime.strptime datetime.datetime datetime datetime strptime last_date '%Y/%m/%d' if s_date < t_date:
    print('Heisei')

else:
    print('TBD') s_date < t_date s_date t_date print('Heisei') print 'Heisei' print('TBD') print 'TBD' last_date = '2019/05/01' '2019/05/01' last_date s=input() input() s s_date = datetime.datetime.strptime(s, '%Y/%m/%d') datetime.datetime.strptime(s, '%Y/%m/%d') s_date t_date = datetime.datetime.strptime(last_date, '%Y/%m/%d') datetime.datetime.strptime(last_date, '%Y/%m/%d') t_date
import datetime

s=input()

s_date = datetime.datetime.strptime(s, '%Y/%m/%d')

last_date = '2019/05/01'

t_date = datetime.datetime.strptime(last_date, '%Y/%m/%d')

if s_date < t_date:
    print('Heisei')

else:
    print('TBD')