S = list(map(str,input().split('/')))
A = int(S[0]+S[1]+S[2])
if A > 20190430:
  print('TBD')
else:
  print('Heisei') S = list(map(str,input().split('/'))) S list(map(str,input().split('/'))) list map(str,input().split('/')) map str input().split('/') ().split () input split '/' A = int(S[0]+S[1]+S[2]) A int(S[0]+S[1]+S[2]) int S[0]+S[1]+S[2] S[0]+S[1] S[0] S 0 S[1] S 1 S[2] S 2 if A > 20190430:
  print('TBD')
else:
  print('Heisei') A > 20190430 A 20190430 print('TBD') print 'TBD' print('Heisei') print 'Heisei' S = list(map(str,input().split('/'))) list(map(str,input().split('/'))) S A = int(S[0]+S[1]+S[2]) int(S[0]+S[1]+S[2]) A
S = list(map(str,input().split('/')))
A = int(S[0]+S[1]+S[2])
if A > 20190430:
  print('TBD')
else:
  print('Heisei')