S = input()

if S <= '2019/04/30':
    print('Heisei')
else:
    print('TBD') S = input() S input() input if S <= '2019/04/30':
    print('Heisei')
else:
    print('TBD') S <= '2019/04/30' S '2019/04/30' print('Heisei') print 'Heisei' print('TBD') print 'TBD' S = input() input() S
S = input()

if S <= '2019/04/30':
    print('Heisei')
else:
    print('TBD')