li = input().split('/')
if int(li[0]) > 2019:
    print('TBD')
else:
    if int(li[1]) <= 4:
        print('Heisei')
    else:
        print('TBD') li = input().split('/') li input().split('/') ().split () input split '/' if int(li[0]) > 2019:
    print('TBD')
else:
    if int(li[1]) <= 4:
        print('Heisei')
    else:
        print('TBD') int(li[0]) > 2019 int(li[0]) int li[0] li 0 2019 print('TBD') print 'TBD' if int(li[1]) <= 4:
        print('Heisei')
    else:
        print('TBD') int(li[1]) <= 4 int(li[1]) int li[1] li 1 4 print('Heisei') print 'Heisei' print('TBD') print 'TBD' li = input().split('/') input().split('/') li
li = input().split('/')
if int(li[0]) > 2019:
    print('TBD')
else:
    if int(li[1]) <= 4:
        print('Heisei')
    else:
        print('TBD')
