input: Write a python function to print a grid of characters based on the product of row and column indices.
  assert print_grid(3, 3) == "A B C \nA C E \nA F K \n"
  assert print_grid(2, 4) == "A B C D \nA C E G \n"
  assert print_grid(4, 4) == "A B C D \nA C E G \nA F K P \nA I P W \n"
output: def print_grid(rows, cols):
      result = []
      for r in range(rows):
          row = []
          for c in range(cols):
              char = chr(65 + r * c)
              row.append(char)
          result.append(" ".join(row))
      return "\n".join(result) + "\n"