Y, M, D = map(int, input().split("/"))
if M <= 4:
    print("Heisei")
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:
    print("Heisei")
else:
    print("TBD") M <= 4 M 4 print("Heisei") print "Heisei" print("TBD") print "TBD" Y, M, D = map(int, input().split("/")) map(int, input().split("/")) Y 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("/"))
if M <= 4:
    print("Heisei")
else:
    print("TBD")
