s = input()
if int(s[:4]) <= 2019:
  if int(s[5:7]) <= 4:
    if int(s[8:10]) <= 30:
      print('Heisei')
    else:
      print('TBD')
  else:
    print('TBD')
else:
  print('TBD') s = input() s input() input if int(s[:4]) <= 2019:
  if int(s[5:7]) <= 4:
    if int(s[8:10]) <= 30:
      print('Heisei')
    else:
      print('TBD')
  else:
    print('TBD')
else:
  print('TBD') int(s[:4]) <= 2019 int(s[:4]) int s[:4] s :4 4 2019 if int(s[5:7]) <= 4:
    if int(s[8:10]) <= 30:
      print('Heisei')
    else:
      print('TBD')
  else:
    print('TBD') int(s[5:7]) <= 4 int(s[5:7]) int s[5:7] s 5:7 5 7 4 if int(s[8:10]) <= 30:
      print('Heisei')
    else:
      print('TBD')
   int(s[8:10]) <= 30 int(s[8:10]) int s[8:10] s 8:10 8 10 30 print('Heisei') print 'Heisei' print('TBD') print 'TBD' print('TBD') print 'TBD' print('TBD') print 'TBD' s = input() input() s
s = input()
if int(s[:4]) <= 2019:
  if int(s[5:7]) <= 4:
    if int(s[8:10]) <= 30:
      print('Heisei')
    else:
      print('TBD')
  else:
    print('TBD')
else:
  print('TBD')
