output_description: Print the number of blocks in K-city.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      n m
attempt: l = input().split()
  H = int(l[0])
  W = int(l[1])
  N = int(input())
  
  
  c = [[0 for i in range(W)] for j in range(H)]
  
  color_num = [int(i) for i in input().split()]
  row = 0
  column = 0
  
  for i in range(N):
      index = color_num[i]
      for j in range(0, index):
          c[row][column] = i + 1
          if column % (W - 1) == 0 and column != 0:
              row += 1
              column = 0
          else:
              column += 1
  
  for i in range(H):
      if i % 2 == 1:
          print("change")
          c[i].reverse()
  
  
  for i in range(0, H):
      for j in range(0, W):
          print(c[i][j], end=" ")
      print("")
  
problem_description: Statement
  
  In _K-city_ , there are n streets running east-west, and m streets running
  north-south. Each street running east-west and each street running north-south
  cross each other. We will call the smallest area that is surrounded by four
  streets a block. How many blocks there are in K-city?
samples: [{"input": "3 4", "output": "6\n    \n\nThere are six blocks, as shown below:\n\n![9179be829dc9810539213537d4c7398c.png](https://atcoder.jp/img/abc069/9179be829dc9810539213537d4c7398c.png)\n\n* * *"}, {"input": "2 2", "output": "1\n    \n\nThere are one block, as shown below:\n\n![997bfafa99be630b54d037225a5c68ea.png](https://atcoder.jp/img/abc069/997bfafa99be630b54d037225a5c68ea.png)"}]