# ABC119
S = input()
if int(S[0:4]) > 2019:
    print('TBD')
    exit()
elif int(S[0:4]) == 2019:
    if int(S[5:7]) >= 5:
        print('TBD')
        exit()
print('Heisei') S = input() S input() input if int(S[0:4]) > 2019:
    print('TBD')
    exit()
elif int(S[0:4]) == 2019:
    if int(S[5:7]) >= 5:
        print('TBD')
        exit() int(S[0:4]) > 2019 int(S[0:4]) int S[0:4] S 0:4 0 4 2019 print('TBD') print 'TBD' exit() exit elif int(S[0:4]) == 2019:
    if int(S[5:7]) >= 5:
        print('TBD')
        exit() int(S[0:4]) == 2019 int(S[0:4]) int S[0:4] S 0:4 0 4 2019 if int(S[5:7]) >= 5:
        print('TBD')
        exit() int(S[5:7]) >= 5 int(S[5:7]) int S[5:7] S 5:7 5 7 5 print('TBD') print 'TBD' exit() exit print('Heisei') print 'Heisei' S = input() input() S
# ABC119
S = input()
if int(S[0:4]) > 2019:
    print('TBD')
    exit()
elif int(S[0:4]) == 2019:
    if int(S[5:7]) >= 5:
        print('TBD')
        exit()
print('Heisei')
