_, m, d = map(int, input().split('/'))

if m < 4:
  print('Heisei')
else:
  if m == 4 and d < 31:
    print('Heisei')
  else:
    print("TBD") _, m, d = map(int, input().split('/')) _ map(int, input().split('/')) map int input().split('/') ().split () input split '/' m d if m < 4:
  print('Heisei')
else:
  if m == 4 and d < 31:
    print('Heisei')
  else:
    print("TBD") m < 4 m 4 print('Heisei') print 'Heisei' if m == 4 and d < 31:
    print('Heisei')
  else:
    print("TBD") m == 4 and d < 31 m == 4 m 4 d < 31 d 31 print('Heisei') print 'Heisei' print("TBD") print "TBD" _, m, d = map(int, input().split('/')) map(int, input().split('/')) _ d = map(int, input().split('/')) map(int, input().split('/')) d m, d = map(int, input().split('/')) map(int, input().split('/')) m
_, m, d = map(int, input().split('/'))

if m < 4:
  print('Heisei')
else:
  if m == 4 and d < 31:
    print('Heisei')
  else:
    print("TBD")