Y,M,D=list(map(int,input().split("/")))

if M<=4:

  print("Heisei")

else:

  print("TBD")

X=eval(input())

A,B,C=(X.split('/'))

B=int(B)

C=int(C)



if B<=4:

    print("Heisei")

else:

    print("TBD")
Y, M, D = list(map(int, input().split("/")))
if M <= 4:
    print("Heisei")
else:
    print("TBD")

X = eval(input())
A, B, C = X.split("/")
B = int(B)
C = int(C)
if B <= 4:
    print("Heisei")
else:
    print("TBD")

-Y, M, D = list(map(int, input().split("/"))) -if M <= 4: +X = eval(input()) +A, B, C = X.split("/") +B = int(B) +C = int(C) +if B <= 4: