s=input()
y=int(s[0:4])
m=int(s[5:7])
if y<2019:
  print('Heisei')
elif y==2019 and m<5:
  print('Heisei')
else:
  print('TBD') s=input() s input() input y=int(s[0:4]) y int(s[0:4]) int s[0:4] s 0:4 0 4 m=int(s[5:7]) m int(s[5:7]) int s[5:7] s 5:7 5 7 if y<2019:
  print('Heisei')
elif y==2019 and m<5:
  print('Heisei')
else:
  print('TBD') y<2019 y 2019 print('Heisei') print 'Heisei' elif y==2019 and m<5:
  print('Heisei') y==2019 and m<5 y==2019 y 2019 m<5 m 5 print('Heisei') print 'Heisei' print('TBD') print 'TBD' s=input() input() s y=int(s[0:4]) int(s[0:4]) y m=int(s[5:7]) int(s[5:7]) m
s=input()
y=int(s[0:4])
m=int(s[5:7])
if y<2019:
  print('Heisei')
elif y==2019 and m<5:
  print('Heisei')
else:
  print('TBD')