ss = input().split('/')
yyyy = int(ss[0])
mm = int(ss[1])
dd = int(ss[2])

if mm >= 5:
    print('TBD')
else:
    print('Heisei') ss = input().split('/') ss input().split('/') ().split () input split '/' yyyy = int(ss[0]) yyyy int(ss[0]) int ss[0] ss 0 mm = int(ss[1]) mm int(ss[1]) int ss[1] ss 1 dd = int(ss[2]) dd int(ss[2]) int ss[2] ss 2 if mm >= 5:
    print('TBD')
else:
    print('Heisei') mm >= 5 mm 5 print('TBD') print 'TBD' print('Heisei') print 'Heisei' mm = int(ss[1]) int(ss[1]) mm yyyy = int(ss[0]) int(ss[0]) yyyy dd = int(ss[2]) int(ss[2]) dd ss = input().split('/') input().split('/') ss
ss = input().split('/')
yyyy = int(ss[0])
mm = int(ss[1])
dd = int(ss[2])

if mm >= 5:
    print('TBD')
else:
    print('Heisei')
