#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y;
};
vector<node> ans[100500];
int main() {
  int i, j, k, n, m;
  scanf("%d%d%d", &n, &m, &k);
  int x, y;
  x = 1;
  y = 1;
  int flag = 1;
  for (i = 1; i < k; i++) {
    node e;
    e.x = x;
    e.y = y;
    ans[i].push_back(e);
    y += flag;
    if (y > m || y == 0) {
      y -= flag;
      flag *= -1;
      x++;
    }
    e.x = x;
    e.y = y;
    ans[i].push_back(e);
    y += flag;
    if (y > m || y == 0) {
      y -= flag;
      flag *= -1;
      x++;
    }
  }
  int now = k * 2 - 2;
  while (now < n * m) {
    now++;
    node e;
    e.x = x;
    e.y = y;
    ans[k].push_back(e);
    y += flag;
    if (y > m || y == 0) {
      y -= flag;
      flag *= -1;
      x++;
    }
  }
  for (i = 1; i <= k; i++) {
    printf("%d", ans[i].size());
    for (j = 0; j < ans[i].size(); j++)
      printf(" %d %d", ans[i][j].x, ans[i][j].y);
    puts("");
  }
}
