y,m,d=[int(x) for x in input().split('/')]
if y < 2019:
  print('Heisei')
elif y > 2019:
  print('TBD')
elif m <= 4:
  print('Heisei')
elif m > 4:
  print('TBD') int(x) for x in input().split('/') for x in input().split('/') x input().split('/') ().split () input split '/' for x in input().split('/') int(x) int x y,m,d=[int(x) for x in input().split('/')] y [int(x) for x in input().split('/')] m d if y < 2019:
  print('Heisei')
elif y > 2019:
  print('TBD')
elif m <= 4:
  print('Heisei')
elif m > 4:
  print('TBD') y < 2019 y 2019 print('Heisei') print 'Heisei' elif y > 2019:
  print('TBD') y > 2019 y 2019 print('TBD') print 'TBD' elif m <= 4:
  print('Heisei') m <= 4 m 4 print('Heisei') print 'Heisei' elif m > 4:
  print('TBD') m > 4 m 4 print('TBD') print 'TBD' y,m,d=[int(x) for x in input().split('/')] [int(x) for x in input().split('/')] y m,d=[int(x) for x in input().split('/')] [int(x) for x in input().split('/')] m d=[int(x) for x in input().split('/')] [int(x) for x in input().split('/')] d
y,m,d=[int(x) for x in input().split('/')]
if y < 2019:
  print('Heisei')
elif y > 2019:
  print('TBD')
elif m <= 4:
  print('Heisei')
elif m > 4:
  print('TBD')