s = input()
if s[5:7] == '04' or s[5:7] == '03' or s[5:7] == '02' or s[5:7] == '01':
    print('Heisei')
else:
    print('TBD') s = input() s input() input if s[5:7] == '04' or s[5:7] == '03' or s[5:7] == '02' or s[5:7] == '01':
    print('Heisei')
else:
    print('TBD') s[5:7] == '04' or s[5:7] == '03' or s[5:7] == '02' or s[5:7] == '01' s[5:7] == '04' or s[5:7] == '03' or s[5:7] == '02' s[5:7] == '04' or s[5:7] == '03' s[5:7] == '04' s[5:7] s 5:7 5 7 '04' s[5:7] == '03' s[5:7] s 5:7 5 7 '03' s[5:7] == '02' s[5:7] s 5:7 5 7 '02' s[5:7] == '01' s[5:7] s 5:7 5 7 '01' print('Heisei') print 'Heisei' print('TBD') print 'TBD' s = input() input() s
s = input()
if s[5:7] == '04' or s[5:7] == '03' or s[5:7] == '02' or s[5:7] == '01':
    print('Heisei')
else:
    print('TBD')