#include <bits/stdc++.h>
#define REP(i, n) for(int i = 0; i < n; i++)
#define ALL(v) (v).begin(), (v).end()

using namespace std;
using ll = long long;

int main()
{
  int H, W, N; cin >> H >> W >> N;
  vector<int> a(N); REP(i, N) cin >> a[i];
  vector<int> c; REP(i, N) REP(j, a[i]) c.push_back(i+1);

  for (int i = 0; i < H; ++i) {
    for (int j = 0; j < W; ++j) {
      if (i%2==0) cout << c[i*W+j] << " ";
      else cout << c[i*W+W-(j+1)] << " ";
    }
    cout << endl;
  }

}