s=input()
x=s.replace('/','')
y=int(x)
if 20190430 >= y:
  print('Heisei')
else:
  print('TBD') s=input() s input() input x=s.replace('/','') x s.replace('/','') s.replace s replace '/' '' y=int(x) y int(x) int x if 20190430 >= y:
  print('Heisei')
else:
  print('TBD') 20190430 >= y 20190430 y print('Heisei') print 'Heisei' print('TBD') print 'TBD' x=s.replace('/','') s.replace('/','') x s=input() input() s y=int(x) int(x) y
s=input()
x=s.replace('/','')
y=int(x)
if 20190430 >= y:
  print('Heisei')
else:
  print('TBD')