S = input()
match = int(S.replace('/',''))

if 20190430 >= match:
    print('Heisei')
else:
    print('TBD')

S = input()
match = int(S.replace('/',''))

if 20190430 >= match:
    print('Heisei')
else:
    print('TBD')
