y, m, d = input().split('/')
t = int(y + m + d)
if t <= 20190430:
    print('Heisei')
else:
    print('TBD') y, m, d = input().split('/') y input().split('/') ().split () input split '/' m d t = int(y + m + d) t int(y + m + d) int y + m + d y + m y m d if t <= 20190430:
    print('Heisei')
else:
    print('TBD') t <= 20190430 t 20190430 print('Heisei') print 'Heisei' print('TBD') print 'TBD' d = input().split('/') input().split('/') d y, m, d = input().split('/') input().split('/') y t = int(y + m + d) int(y + m + d) t m, d = input().split('/') input().split('/') m
y, m, d = input().split('/')
t = int(y + m + d)
if t <= 20190430:
    print('Heisei')
else:
    print('TBD')