input: Write a function to print the following output pattern where each row contains numbers from 1 to the row number. The function should take an integer `n` as input, which represents the number of rows in the pattern.
  assert print_pattern(5)
  assert print_pattern(3)
  assert print_pattern(1)
output: def print_pattern(n):
      for i in range(1, n + 1):
          for j in range(1, i + 1):
              print(j, end="")
          print()