def infix_2_prefix(infix):
    infix = list(infix[::-1])  # reverse the infix equation

    for i in range(len(infix)):
        if infix[i] == "(":
            infix[i] = ")"  # change "(" to ")"
        elif infix[i] == ")":
            infix[i] = "("  # change ")" to "("

    return (infix_2_postfix("".join(infix)))[
        ::-1
    ]  # call infix_2_postfix on Infix, return reverse of Postfix