#include <bits/stdc++.h>
using namespace std;
int k = 0, m, l = 0, L, n, i, R, C, s, K;
int spiralPrint() {
  int c = 0;
  s = m * n;
  L = K;
  int pos = (s / L);
  s -= (s / L);
  L--;
  cout << pos << " ";
  while (k < m && l < n) {
    for (i = l; i < n; ++i) {
      if (c < pos) {
        cout << k + 1 << " " << i + 1 << " ";
        c++;
      } else {
        cout << endl;
        if (L >= 1) {
          pos = (s / L);
          cout << pos << " ";
          s -= (s / L);
          L--;
          c = 0;
          i--;
        } else
          return 0;
      }
    }
    k++;
    for (i = k; i < m; ++i) {
      if (c < pos) {
        cout << i + 1 << " " << n << " ";
        c++;
      } else {
        cout << endl;
        if (L >= 1) {
          pos = (s / L);
          s -= (s / L);
          cout << pos << " ";
          L--;
          c = 0;
          i--;
        } else
          return 0;
      }
    }
    n--;
    if (k < m) {
      for (i = n - 1; i >= l; --i) {
        if (c < pos) {
          cout << m << " " << i + 1 << " ";
          c++;
        } else {
          cout << endl;
          if (L >= 1) {
            pos = (s / L);
            s -= (s / L);
            cout << pos << " ";
            L--;
            c = 0;
            i++;
          } else
            return 0;
        }
      }
      m--;
    }
    if (l < n) {
      for (i = m - 1; i >= k; --i) {
        if (c < pos) {
          cout << i + 1 << " " << l + 1 << " ";
          c++;
        } else {
          cout << endl;
          if (L >= 1) {
            pos = (s / L);
            s -= (s / L);
            cout << pos << " ";
            L--;
            c = 0;
            i++;
          } else
            return 0;
        }
      }
      l++;
    }
  }
}
int main() {
  cin >> m >> n >> K;
  spiralPrint();
  return 0;
}
