#include <bits/stdc++.h>
int main() {
  int n, m, k, j = 1, i;
  scanf("%d %d %d", &n, &m, &k);
  int s = n * m / k;
  int row = 1, col = 1, flag = 1;
  for (i = 1; i <= k; i++) {
    if (i == k) s += n * m % k;
    printf("%d ", s);
    for (j = 1; j <= s; j++) {
      printf("%d %d ", row, col);
      col += flag * 1;
      if (col > m)
        row++, col = m, flag = -1;
      else if (col < 1)
        row++, col = 1, flag = 1;
    }
    printf("\n");
  }
  return 0;
}
