S = int(input().replace('/', ''))

if S <= 20190430:
    print('Heisei')
else:
    print('TBD')
 S = int(input().replace('/', '')) S int(input().replace('/', '')) int input().replace('/', '') ().replace () input replace '/' '' if S <= 20190430:
    print('Heisei')
else:
    print('TBD') S <= 20190430 S 20190430 print('Heisei') print 'Heisei' print('TBD') print 'TBD' S = int(input().replace('/', '')) int(input().replace('/', '')) S
S = int(input().replace('/', ''))

if S <= 20190430:
    print('Heisei')
else:
    print('TBD')

