s = input()
y = int(s[0:4])
m = int(s[5:7])
d = int(s[8:10])

if y < 2019:
  print('Heisei')
elif m <= 4 and d <= 30:
  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 d = int(s[8:10]) d int(s[8:10]) int s[8:10] s 8:10 8 10 if y < 2019:
  print('Heisei')
elif m <= 4 and d <= 30:
  print('Heisei')
else:
  print('TBD') y < 2019 y 2019 print('Heisei') print 'Heisei' elif m <= 4 and d <= 30:
  print('Heisei') m <= 4 and d <= 30 m <= 4 m 4 d <= 30 d 30 print('Heisei') print 'Heisei' print('TBD') print 'TBD' m = int(s[5:7]) int(s[5:7]) m s = input() input() s y = int(s[0:4]) int(s[0:4]) y d = int(s[8:10]) int(s[8:10]) d
s = input()
y = int(s[0:4])
m = int(s[5:7])
d = int(s[8:10])

if y < 2019:
  print('Heisei')
elif m <= 4 and d <= 30:
  print('Heisei')
else:
  print('TBD')
