#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, q, r, cnt, x;
  cin >> n >> m >> k;
  if (n >= k) {
    int temp = n;
    q = n / k;
    r = n % k;
    if (r == 0)
      x = k;
    else
      x = k - 1;
    int i = 1;
    while (x and i <= n) {
      cnt = 0;
      cout << m * q << " ";
      while (cnt != q and i <= n) {
        for (int j = 1; j < m + 1; j++) {
          if (i & 1)
            cout << i << " " << j << " ";
          else
            cout << i << " " << m + 1 - j << " ";
        }
        cnt++, i++;
      }
      x--, cout << "\n";
    }
    if (r--) {
      cout << n * m - m * q * (k - 1) << " ";
      while (i <= n) {
        for (int j = 1; j < m + 1; j++)
          if (i & 1)
            cout << i << " " << j << " ";
          else
            cout << i << " " << m + 1 - j << " ";
        i++;
      }
    }
  } else {
    int i, j;
    i = 1, j = 1;
    int temp = k - 1;
    while (temp--) {
      cnt = 2;
      cout << cnt << " ";
      while (cnt--) {
        if (i & 1) {
          cout << i << " " << j << " ";
          j++;
          if (j == m + 1) i++, j = 1;
        } else {
          cout << i << " " << m + 1 - j << " ", j++;
          if (j == m + 1) i++, j = 1;
        }
      }
      cout << "\n";
    }
    cout << n * m - 2 * k + 2 << " ";
    while (i <= n) {
      while (j <= m) {
        if (i & 1)
          cout << i << " " << j << " ";
        else
          cout << i << " " << m + 1 - j << " ";
        j++;
      }
      i++, j = 1;
    }
    cout << "\n";
  }
  return 0;
}
