#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k;
  cin >> n >> m >> k;
  int a[n][m];
  int c = 0, len = 0;
  for (int i = 0; i < n; i++) {
    if (!(i & 1)) {
      for (int j = 0; j < m; j++) {
        if (c != (k - 1)) {
          if (len == 2) {
            c++;
            len = 0;
          }
        }
        a[i][j] = c;
        len++;
      }
    } else {
      for (int j = (m - 1); j >= 0; j--) {
        if (c != (k - 1)) {
          if (len == 2) {
            c++;
            len = 0;
          }
        }
        a[i][j] = c;
        len++;
      }
    }
  }
  map<int, vector<pair<int, int> > > p;
  for (int i = 0; i < n; i++) {
    if (!(i & 1)) {
      for (int j = 0; j < m; j++) {
        p[a[i][j]].push_back(make_pair(i + 1, j + 1));
      }
    } else {
      for (int j = (m - 1); j >= 0; j--) {
        p[a[i][j]].push_back(make_pair(i + 1, j + 1));
      }
    }
  }
  for (map<int, vector<pair<int, int> > >::iterator it = p.begin();
       it != p.end(); ++it) {
    cout << it->second.size() << " ";
    for (vector<pair<int, int> >::iterator tt = (it->second.begin());
         tt != (it->second).end(); ++tt) {
      cout << tt->first << " " << tt->second << " ";
    }
    cout << "\n";
  }
  return 0;
}
