year, month, day = map(int, input().split('/'))
if year <= 2019 and month <= 4 and day <= 30:
    print('Heisei')
else:
    print('TBD') year, month, day = map(int, input().split('/')) year map(int, input().split('/')) map int input().split('/') ().split () input split '/' month day if year <= 2019 and month <= 4 and day <= 30:
    print('Heisei')
else:
    print('TBD') year <= 2019 and month <= 4 and day <= 30 year <= 2019 and month <= 4 year <= 2019 year 2019 month <= 4 month 4 day <= 30 day 30 print('Heisei') print 'Heisei' print('TBD') print 'TBD' month, day = map(int, input().split('/')) map(int, input().split('/')) month year, month, day = map(int, input().split('/')) map(int, input().split('/')) year day = map(int, input().split('/')) map(int, input().split('/')) day
year, month, day = map(int, input().split('/'))
if year <= 2019 and month <= 4 and day <= 30:
    print('Heisei')
else:
    print('TBD')