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