input: def calculate_maximum_revenue(weights: List[int], values: List[int], W: int) -> int:
      """Calculate the maximum possible revenue from the items with given weights and values.
      >>> calculate_maximum_revenue([2, 1, 3], [4, 2, 3], 5)
      7
      >>> calculate_maximum_revenue([1, 2, 3], [6, 10, 12], 5)
      22
      """
output:     dp = [0] * (W + 1)
      for i in range(len(weights)):
          for w in range(W, weights[i] - 1, -1):
              dp[w] = max(dp[w], dp[w - weights[i]] + values[i])
      return dp[W]