y, m ,d = map(int, input().split('/'))
if y < 2019:
  print('Heisei')
elif y > 2019:
  print('TBD')
else:
  if m < 4:
    print('Heisei')
  elif m > 4:
    print('TBD')
  else:
    if d <= 30:
      print('Heisei')
    else:
      print('TBD') y, m ,d = map(int, input().split('/')) y map(int, input().split('/')) map int input().split('/') ().split () input split '/' m d if y < 2019:
  print('Heisei')
elif y > 2019:
  print('TBD')
else:
  if m < 4:
    print('Heisei')
  elif m > 4:
    print('TBD')
  else:
    if d <= 30:
      print('Heisei')
    else:
      print('TBD') y < 2019 y 2019 print('Heisei') print 'Heisei' elif y > 2019:
  print('TBD') y > 2019 y 2019 print('TBD') print 'TBD' if m < 4:
    print('Heisei')
  elif m > 4:
    print('TBD')
  else:
    if d <= 30:
      print('Heisei')
    else:
      print('TBD') m < 4 m 4 print('Heisei') print 'Heisei' elif m > 4:
    print('TBD')
   m > 4 m 4 print('TBD') print 'TBD' if d <= 30:
      print('Heisei')
    else:
      print('TBD') d <= 30 d 30 print('Heisei') print 'Heisei' print('TBD') print 'TBD' y, m ,d = map(int, input().split('/')) map(int, input().split('/')) y m ,d = map(int, input().split('/')) map(int, input().split('/')) m d = map(int, input().split('/')) map(int, input().split('/')) d
y, m ,d = map(int, input().split('/'))
if y < 2019:
  print('Heisei')
elif y > 2019:
  print('TBD')
else:
  if m < 4:
    print('Heisei')
  elif m > 4:
    print('TBD')
  else:
    if d <= 30:
      print('Heisei')
    else:
      print('TBD')