S = input()

if int(S[0:4]) <= 2018 or (int(S[0:4]) == 2019 and int(S[5:7]) < 5):
    print('Heisei')
else:
    print('TBD') S = input() S input() input if int(S[0:4]) <= 2018 or (int(S[0:4]) == 2019 and int(S[5:7]) < 5):
    print('Heisei')
else:
    print('TBD') int(S[0:4]) <= 2018 or (int(S[0:4]) == 2019 and int(S[5:7]) < 5) int(S[0:4]) <= 2018 int(S[0:4]) int S[0:4] S 0:4 0 4 2018 int(S[0:4]) == 2019 and int(S[5:7]) < 5 int(S[0:4]) == 2019 int(S[0:4]) int S[0:4] S 0:4 0 4 2019 int(S[5:7]) < 5 int(S[5:7]) int S[5:7] S 5:7 5 7 5 print('Heisei') print 'Heisei' print('TBD') print 'TBD' S = input() input() S
S = input()

if int(S[0:4]) <= 2018 or (int(S[0:4]) == 2019 and int(S[5:7]) < 5):
    print('Heisei')
else:
    print('TBD')
