#include <bits/stdc++.h>
using namespace std;
int n, m, k, x, y, i = 1;
void f(int x) {
  cout << " " << ((x - 1) / n) + 1;
  if ((((x - 1) % (2 * n)) + 1) <= n)
    cout << " " << ((x - 1) % (2 * n)) + 1;
  else
    cout << " " << (2 * n + 1) - (((x - 1) % (2 * n)) + 1);
}
int main() {
  cin >> m >> n >> k;
  for (int j = 0; j < k - 1; j++) {
    cout << 2 << " ";
    f(i);
    i++;
    f(i);
    i++;
    cout << endl;
  }
  cout << (m * n) - (2 * (k - 1));
  while (i <= (n * m)) {
    f(i);
    i++;
  }
}
