from datetime import datetime
S = list(map(int,input().split('/')))

base = datetime(2019, 4, 30, 0, 0)
compare = datetime(S[0], S[1], S[2], 0, 0)

print('Heisei') if compare <= base else print('TBD') from datetime import datetime S = list(map(int,input().split('/'))) S list(map(int,input().split('/'))) list map(int,input().split('/')) map int input().split('/') ().split () input split '/' base = datetime(2019, 4, 30, 0, 0) base datetime(2019, 4, 30, 0, 0) datetime 2019 4 30 0 0 compare = datetime(S[0], S[1], S[2], 0, 0) compare datetime(S[0], S[1], S[2], 0, 0) datetime S[0] S 0 S[1] S 1 S[2] S 2 0 0 print('Heisei') if compare <= base else print('TBD') compare <= base compare base print('Heisei') print 'Heisei' print('TBD') print 'TBD' compare = datetime(S[0], S[1], S[2], 0, 0) datetime(S[0], S[1], S[2], 0, 0) compare S = list(map(int,input().split('/'))) list(map(int,input().split('/'))) S base = datetime(2019, 4, 30, 0, 0) datetime(2019, 4, 30, 0, 0) base
from datetime import datetime
S = list(map(int,input().split('/')))

base = datetime(2019, 4, 30, 0, 0)
compare = datetime(S[0], S[1], S[2], 0, 0)

print('Heisei') if compare <= base else print('TBD')