s=input()
t=s[:4]
u=s[5:7]
v=s[8:]
w=int(t+u+v)

if w<=20190430:
  print('Heisei')
  
else:
  print('TBD') s=input() s input() input t=s[:4] t s[:4] s :4 4 u=s[5:7] u s[5:7] s 5:7 5 7 v=s[8:] v s[8:] s 8: 8 w=int(t+u+v) w int(t+u+v) int t+u+v t+u t u v if w<=20190430:
  print('Heisei')
  
else:
  print('TBD') w<=20190430 w 20190430 print('Heisei') print 'Heisei' print('TBD') print 'TBD' t=s[:4] s[:4] t w=int(t+u+v) int(t+u+v) w u=s[5:7] s[5:7] u v=s[8:] s[8:] v s=input() input() s
s=input()
t=s[:4]
u=s[5:7]
v=s[8:]
w=int(t+u+v)

if w<=20190430:
  print('Heisei')
  
else:
  print('TBD')