s = input()
year = int(s[:4])
month = int(s[5:7])
day = int(s[9:])
if year > 2019:
  print('TBD')
elif year < 2019:
  print('Heisei')
else:
  if month > 4:
    print('TBD')
  elif month < 4:
    print('Heisei')
  else:
    if day > 30:
      print('TBD')
    else:
      print('Heisei') s = input() s input() input year = int(s[:4]) year int(s[:4]) int s[:4] s :4 4 month = int(s[5:7]) month int(s[5:7]) int s[5:7] s 5:7 5 7 day = int(s[9:]) day int(s[9:]) int s[9:] s 9: 9 if year > 2019:
  print('TBD')
elif year < 2019:
  print('Heisei')
else:
  if month > 4:
    print('TBD')
  elif month < 4:
    print('Heisei')
  else:
    if day > 30:
      print('TBD')
    else:
      print('Heisei') year > 2019 year 2019 print('TBD') print 'TBD' elif year < 2019:
  print('Heisei') year < 2019 year 2019 print('Heisei') print 'Heisei' if month > 4:
    print('TBD')
  elif month < 4:
    print('Heisei')
  else:
    if day > 30:
      print('TBD')
    else:
      print('Heisei') month > 4 month 4 print('TBD') print 'TBD' elif month < 4:
    print('Heisei')
   month < 4 month 4 print('Heisei') print 'Heisei' if day > 30:
      print('TBD')
    else:
      print('Heisei') day > 30 day 30 print('TBD') print 'TBD' print('Heisei') print 'Heisei' year = int(s[:4]) int(s[:4]) year month = int(s[5:7]) int(s[5:7]) month day = int(s[9:]) int(s[9:]) day s = input() input() s
s = input()
year = int(s[:4])
month = int(s[5:7])
day = int(s[9:])
if year > 2019:
  print('TBD')
elif year < 2019:
  print('Heisei')
else:
  if month > 4:
    print('TBD')
  elif month < 4:
    print('Heisei')
  else:
    if day > 30:
      print('TBD')
    else:
      print('Heisei')
