#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, count = 0, flag = 1, j = 1, i, l, no;
  cin >> n >> m >> k;
  count = (n * m) / k;
  int count1 = (n * m) % k + count;
  no = k;
  for (i = 1; i <= n; i++) {
    if (flag) {
      for (l = 1; l <= m; l++) {
        if (j == 1) {
          no--;
          if (no == 0) {
            count = count1;
          }
          printf("%d ", count);
        }
        if (j == count) {
          printf("%d %d\n", i, l);
          j = 0;
        } else {
          printf("%d %d ", i, l);
        }
        j++;
      }
      flag = 0;
    } else {
      for (l = m; l >= 1; l--) {
        if (j == 1) {
          no--;
          if (no == 0) {
            count = count1;
          }
          printf("%d ", count);
        }
        if (j == count) {
          printf("%d %d\n", i, l);
          j = 0;
        } else {
          printf("%d %d ", i, l);
        }
        j++;
      }
      flag = 1;
    }
  }
  return 0;
}
