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

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

if M <= 4:
    if D <= 30:
        print("Heisei")
    else:
        print("TBD")
else:
    print("TBD")
