#include <bits/stdc++.h>
using namespace std;
void AddCells(vector<pair<int, int> >& pts, int& index, const int& row_number,
              const int& start_val, const int& end_val) {
  int added_val = start_val < end_val ? 1 : -1;
  for (int j = start_val; j != end_val; j += added_val) {
    pts[index++] = make_pair(row_number, j);
  }
}
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int tube_size = (n * m) / k;
  int reminder = (n * m) % k;
  int row = 1, index = 0;
  vector<pair<int, int> > pts(n * m);
  bool reversed = false;
  while (row <= n) {
    if (!reversed)
      AddCells(pts, index, row, 1, m + 1);
    else
      AddCells(pts, index, row, m, 0);
    row++;
    reversed = !reversed;
  }
  index = 0;
  while (k--) {
    if (k == 0)
      printf("%d ", tube_size + reminder);
    else
      printf("%d ", tube_size);
    int tmp = tube_size;
    if (k == 0) tmp += reminder;
    while (tmp--) {
      printf("%d %d ", pts[index].first, pts[index].second);
      index++;
    }
    printf("\n");
  }
  return 0;
}
