a,b,c = input().split('/')
if int(a) <= 2019 and int(b) <= 4 and int(c) <=30:
    print('Heisei')
else:
    print('TBD') a,b,c = input().split('/') a input().split('/') ().split () input split '/' b c if int(a) <= 2019 and int(b) <= 4 and int(c) <=30:
    print('Heisei')
else:
    print('TBD') int(a) <= 2019 and int(b) <= 4 and int(c) <=30 int(a) <= 2019 and int(b) <= 4 int(a) <= 2019 int(a) int a 2019 int(b) <= 4 int(b) int b 4 int(c) <=30 int(c) int c 30 print('Heisei') print 'Heisei' print('TBD') print 'TBD' c = input().split('/') input().split('/') c b,c = input().split('/') input().split('/') b a,b,c = input().split('/') input().split('/') a
a,b,c = input().split('/')
if int(a) <= 2019 and int(b) <= 4 and int(c) <=30:
    print('Heisei')
else:
    print('TBD')
