import re
s = input()
a = re.search(r'\d{4}/(\d)(\d)/\d{2}', s)
if a.group(1) == '0' and (a.group(2) == '1' or a.group(2) == '2' or a.group(2) == '3' or a.group(2) == '4'):
    print('Heisei')
else:
    print('TBD') import re re s = input() s input() input a = re.search(r'\d{4}/(\d)(\d)/\d{2}', s) a re.search(r'\d{4}/(\d)(\d)/\d{2}', s) re.search re search r'\d{4}/(\d)(\d)/\d{2}' s if a.group(1) == '0' and (a.group(2) == '1' or a.group(2) == '2' or a.group(2) == '3' or a.group(2) == '4'):
    print('Heisei')
else:
    print('TBD') a.group(1) == '0' and (a.group(2) == '1' or a.group(2) == '2' or a.group(2) == '3' or a.group(2) == '4') a.group(1) == '0' a.group(1) a.group a group 1 '0' a.group(2) == '1' or a.group(2) == '2' or a.group(2) == '3' or a.group(2) == '4' a.group(2) == '1' or a.group(2) == '2' or a.group(2) == '3' a.group(2) == '1' or a.group(2) == '2' a.group(2) == '1' a.group(2) a.group a group 2 '1' a.group(2) == '2' a.group(2) a.group a group 2 '2' a.group(2) == '3' a.group(2) a.group a group 2 '3' a.group(2) == '4' a.group(2) a.group a group 2 '4' print('Heisei') print 'Heisei' print('TBD') print 'TBD' a = re.search(r'\d{4}/(\d)(\d)/\d{2}', s) re.search(r'\d{4}/(\d)(\d)/\d{2}', s) a s = input() input() s
import re
s = input()
a = re.search(r'\d{4}/(\d)(\d)/\d{2}', s)
if a.group(1) == '0' and (a.group(2) == '1' or a.group(2) == '2' or a.group(2) == '3' or a.group(2) == '4'):
    print('Heisei')
else:
    print('TBD')