s=input()
if s[5:7] in ['01','02','03']:
  print('Heisei')
elif s[6:7] == '4' and int(s[-2:-1]) <= 30:
  print('Heisei')
else:
  print('TBD') s=input() s input() input if s[5:7] in ['01','02','03']:
  print('Heisei')
elif s[6:7] == '4' and int(s[-2:-1]) <= 30:
  print('Heisei')
else:
  print('TBD') s[5:7] in ['01','02','03'] s[5:7] s 5:7 5 7 ['01','02','03'] '01' '02' '03' print('Heisei') print 'Heisei' elif s[6:7] == '4' and int(s[-2:-1]) <= 30:
  print('Heisei') s[6:7] == '4' and int(s[-2:-1]) <= 30 s[6:7] == '4' s[6:7] s 6:7 6 7 '4' int(s[-2:-1]) <= 30 int(s[-2:-1]) int s[-2:-1] s -2:-1 -2 -1 30 print('Heisei') print 'Heisei' print('TBD') print 'TBD' s=input() input() s
s=input()
if s[5:7] in ['01','02','03']:
  print('Heisei')
elif s[6:7] == '4' and int(s[-2:-1]) <= 30:
  print('Heisei')
else:
  print('TBD')
