s = input()
y, m, d = map(int, s.split('/'))
if m >= 5:
    print('TBD')
elif y >= 2020:
    print('TBD')
else:
    print('Heisei') s = input() s input() input y, m, d = map(int, s.split('/')) y map(int, s.split('/')) map int s.split('/') s.split s split '/' m d if m >= 5:
    print('TBD')
elif y >= 2020:
    print('TBD')
else:
    print('Heisei') m >= 5 m 5 print('TBD') print 'TBD' elif y >= 2020:
    print('TBD') y >= 2020 y 2020 print('TBD') print 'TBD' print('Heisei') print 'Heisei' m, d = map(int, s.split('/')) map(int, s.split('/')) m y, m, d = map(int, s.split('/')) map(int, s.split('/')) y s = input() input() s d = map(int, s.split('/')) map(int, s.split('/')) d
s = input()
y, m, d = map(int, s.split('/'))
if m >= 5:
    print('TBD')
elif y >= 2020:
    print('TBD')
else:
    print('Heisei')
