input: def evaluate(expression: str) -> int:
      """ Evaluates a postfix expression given as input string. Returns the 
      evaluated value of the expression.
      >>> evaluate("2 3 + 4 5 * *")
      46
      >>> evaluate("5 3 +")
      8
      >>> evaluate("7 2 * 4 +")
      18
      """
output:     stack = []
      tokens = expression.split()
      
      for token in tokens:
          if token.isdigit():
              stack.append(int(token))
          else:
              b = stack.pop()
              a = stack.pop()
              if token == '+':
                  stack.append(a + b)
              elif token == '-':
                  stack.append(a - b)
              elif token == '*':
                  stack.append(a * b)
              elif token == '/':
                  stack.append(a // b)  # Using integer division for simplicity
      
      return stack[0]