import datetime as dt

s = dt.datetime.strptime(eval(input()), '%Y/%m/%d')

lastD = dt.datetime.strptime('2019/4/30', '%Y/%m/%d')



if s <= lastD:

  print('Heisei')

else:

  print('TBD')
y,m,d = list(map(int, input().split('/')))

ans = ''

if y<2019:

  ans = 'Heisei'

elif y==2019:

  if m<4 or (m==4 and d<=30):

    ans = 'Heisei'

  else:

    ans = 'TBD'

else:

  ans = 'TBD'



print(ans)
import datetime as dt

s = dt.datetime.strptime(eval(input()), "%Y/%m/%d")
lastD = dt.datetime.strptime("2019/4/30", "%Y/%m/%d")
if s <= lastD:
    print("Heisei")
else:
    print("TBD")

y, m, d = list(map(int, input().split("/")))
ans = ""
if y < 2019:
    ans = "Heisei"
elif y == 2019:
    if m < 4 or (m == 4 and d <= 30):
        ans = "Heisei"
    else:
        ans = "TBD"
else:
    ans = "TBD"
print(ans)

-import datetime as dt - -s = dt.datetime.strptime(eval(input()), "%Y/%m/%d") -lastD = dt.datetime.strptime("2019/4/30", "%Y/%m/%d") -if s <= lastD: -    print("Heisei") +y, m, d = list(map(int, input().split("/"))) +ans = "" +if y < 2019: +    ans = "Heisei" +elif y == 2019: +    if m < 4 or (m == 4 and d <= 30): +        ans = "Heisei" +    else: +        ans = "TBD" -    print("TBD") +    ans = "TBD" +print(ans)