input: Write a function to convert an infix expression to postfix.
  assert infixToPostfix("A+B*C") == "ABC*+"
  assert infixToPostfix("(A+B)*C") == "AB+C*"
  assert infixToPostfix("A*B+C") == "AB*C+"
output: def infixToPostfix(expression):
      precedence = {'+': 1, '-': 1, '*': 2, '/': 2, '^': 3}
      stack = []
      output = []
  
      for char in expression:
          if char.isalnum():  # if operand, add to output
              output.append(char)
          elif char == '(':  # if '(', push to stack
              stack.append(char)
          elif char == ')':  # if ')', pop from stack to output until '('
              while stack and stack[-1] != '(':
                  output.append(stack.pop())
              stack.pop()
          else:  # if operator
              while stack and stack[-1] != '(' and precedence[char] <= precedence[stack[-1]]:
                  output.append(stack.pop())
              stack.append(char)
      
      # pop all the operators from the stack
      while stack:
          output.append(stack.pop())
  
      return ''.join(output)