x = list(map(int, input().split("/")))
if x[0] > 2019:
    print("TBD")
    exit()
elif x[0] == 2019:
    if x[1] > 4:
        print("TBD")
        exit()
    elif x[1] == 4:
        if x[2] > 30:
            print("TBD")
            exit()
        else:
            print("Heisei")
            exit()
    else:
        print("Heisei")
        exit()
else:
    print("Heisei")
    exit() x = list(map(int, input().split("/"))) x list(map(int, input().split("/"))) list map(int, input().split("/")) map int input().split("/") ().split () input split "/" if x[0] > 2019:
    print("TBD")
    exit()
elif x[0] == 2019:
    if x[1] > 4:
        print("TBD")
        exit()
    elif x[1] == 4:
        if x[2] > 30:
            print("TBD")
            exit()
        else:
            print("Heisei")
            exit()
    else:
        print("Heisei")
        exit()
else:
    print("Heisei")
    exit() x[0] > 2019 x[0] x 0 2019 print("TBD") print "TBD" exit() exit elif x[0] == 2019:
    if x[1] > 4:
        print("TBD")
        exit()
    elif x[1] == 4:
        if x[2] > 30:
            print("TBD")
            exit()
        else:
            print("Heisei")
            exit()
    else:
        print("Heisei")
        exit() x[0] == 2019 x[0] x 0 2019 if x[1] > 4:
        print("TBD")
        exit()
    elif x[1] == 4:
        if x[2] > 30:
            print("TBD")
            exit()
        else:
            print("Heisei")
            exit()
    else:
        print("Heisei")
        exit() x[1] > 4 x[1] x 1 4 print("TBD") print "TBD" exit() exit elif x[1] == 4:
        if x[2] > 30:
            print("TBD")
            exit()
        else:
            print("Heisei")
            exit()
     x[1] == 4 x[1] x 1 4 if x[2] > 30:
            print("TBD")
            exit()
        else:
            print("Heisei")
            exit()
     x[2] > 30 x[2] x 2 30 print("TBD") print "TBD" exit() exit print("Heisei") print "Heisei" exit() exit print("Heisei") print "Heisei" exit() exit print("Heisei") print "Heisei" exit() exit x = list(map(int, input().split("/"))) list(map(int, input().split("/"))) x
x = list(map(int, input().split("/")))
if x[0] > 2019:
    print("TBD")
    exit()
elif x[0] == 2019:
    if x[1] > 4:
        print("TBD")
        exit()
    elif x[1] == 4:
        if x[2] > 30:
            print("TBD")
            exit()
        else:
            print("Heisei")
            exit()
    else:
        print("Heisei")
        exit()
else:
    print("Heisei")
    exit()
