S = list(input())


if S[5] == '1':
    print('TBD')

elif S[6] == '1' or S[6] == '2' or S[6] == '3' or S[6] == '4':
    print('Heisei')

else:
    print('TBD')    S = list(input()) S list(input()) list input() input if S[5] == '1':
    print('TBD')

elif S[6] == '1' or S[6] == '2' or S[6] == '3' or S[6] == '4':
    print('Heisei')

else:
    print('TBD')    S[5] == '1' S[5] S 5 '1' print('TBD') print 'TBD' elif S[6] == '1' or S[6] == '2' or S[6] == '3' or S[6] == '4':
    print('Heisei') S[6] == '1' or S[6] == '2' or S[6] == '3' or S[6] == '4' S[6] == '1' or S[6] == '2' or S[6] == '3' S[6] == '1' or S[6] == '2' S[6] == '1' S[6] S 6 '1' S[6] == '2' S[6] S 6 '2' S[6] == '3' S[6] S 6 '3' S[6] == '4' S[6] S 6 '4' print('Heisei') print 'Heisei' print('TBD') print 'TBD' S = list(input()) list(input()) S
S = list(input())


if S[5] == '1':
    print('TBD')

elif S[6] == '1' or S[6] == '2' or S[6] == '3' or S[6] == '4':
    print('Heisei')

else:
    print('TBD')   