a,b,c = map (int, input ().split ('/'))
if a > 2019:
  print ('TBD')
else:
  if b*100+c > 430:
    print ('TBD')
  else:
    print ('Heisei') a,b,c = map (int, input ().split ('/')) a map (int, input ().split ('/')) map int input ().split ('/') ().split () input split '/' b c if a > 2019:
  print ('TBD')
else:
  if b*100+c > 430:
    print ('TBD')
  else:
    print ('Heisei') a > 2019 a 2019 print ('TBD') print 'TBD' if b*100+c > 430:
    print ('TBD')
  else:
    print ('Heisei') b*100+c > 430 b*100+c b*100 b 100 c 430 print ('TBD') print 'TBD' print ('Heisei') print 'Heisei' c = map (int, input ().split ('/')) map (int, input ().split ('/')) c b,c = map (int, input ().split ('/')) map (int, input ().split ('/')) b a,b,c = map (int, input ().split ('/')) map (int, input ().split ('/')) a
a,b,c = map (int, input ().split ('/'))
if a > 2019:
  print ('TBD')
else:
  if b*100+c > 430:
    print ('TBD')
  else:
    print ('Heisei')