date = list(map(int,input().split('/')))
print('Heisei'if date[0]<=2019 and date[1]<=4 and date[2]<=30 else 'TBD') date = list(map(int,input().split('/'))) date list(map(int,input().split('/'))) list map(int,input().split('/')) map int input().split('/') ().split () input split '/' print('Heisei'if date[0]<=2019 and date[1]<=4 and date[2]<=30 else 'TBD') print 'Heisei'if date[0]<=2019 and date[1]<=4 and date[2]<=30 else 'TBD' date[0]<=2019 and date[1]<=4 and date[2]<=30 date[0]<=2019 and date[1]<=4 date[0]<=2019 date[0] date 0 2019 date[1]<=4 date[1] date 1 4 date[2]<=30 date[2] date 2 30 'Heisei' 'TBD' date = list(map(int,input().split('/'))) list(map(int,input().split('/'))) date
date = list(map(int,input().split('/')))
print('Heisei'if date[0]<=2019 and date[1]<=4 and date[2]<=30 else 'TBD')