s = input()
year = s[0:4]
month = s[5:7]
day = s[8:10]
i = int(year + month + day)
if i <= 20190430:
  print('Heisei')
else:
  print('TBD') s = input() s input() input year = s[0:4] year s[0:4] s 0:4 0 4 month = s[5:7] month s[5:7] s 5:7 5 7 day = s[8:10] day s[8:10] s 8:10 8 10 i = int(year + month + day) i int(year + month + day) int year + month + day year + month year month day if i <= 20190430:
  print('Heisei')
else:
  print('TBD') i <= 20190430 i 20190430 print('Heisei') print 'Heisei' print('TBD') print 'TBD' year = s[0:4] s[0:4] year month = s[5:7] s[5:7] month i = int(year + month + day) int(year + month + day) i s = input() input() s day = s[8:10] s[8:10] day
s = input()
year = s[0:4]
month = s[5:7]
day = s[8:10]
i = int(year + month + day)
if i <= 20190430:
  print('Heisei')
else:
  print('TBD')