#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int mod = 1000 * 1000 * 1000 + 7;
const long long inf = 1e18;
void rd(int &x) { scanf("%d", &x); }
void rd(long long &x) { scanf("%lld", &x); }
void rd(double &x) { scanf("%lf", &x); }
void rd(int &x, int &y) { scanf("%d%d", &x, &y); }
void rd(long long &x, long long &y) { scanf("%lld%lld", &x, &y); }
void rd(int &x, int &y, int &z) { scanf("%d%d%d", &x, &y, &z); }
void rd(long long &x, long long &y, long long &z) {
  scanf("%lld%lld%lld", &x, &y, &z);
}
void rd(double &x, double &y) { scanf("%lf%lf", &x, &y); }
void rd(double &x, double &y, double &z) { scanf("%lf%lf%lf", &x, &y, &z); }
void rd(char *s) { scanf("%s", s); }
void rd(char &s) { scanf("%c", &s); }
void rd(string &s) { getline(cin, s); }
void pf(int x) { printf("%d\n", x); }
void pf(int x, int y) { printf("%d %d\n", x, y); }
void pf(long long x) { printf("%lld\n", x); }
void pf(char x) { printf("%c\n", x); }
void pf(char *x) { printf("%s\n", x); }
void pf(string x) { cout << x << endl; }
int main() {
  int n, m, k, x = 0, y = 0, f = 1, p, q, ans = 0;
  cin >> n >> m >> k;
  if (k == 1) {
    cout << m * n << " ";
    for (int i = 1; i <= (n); i++)
      for (int j = 1; j <= (m); j++) {
        if (i % 2 == 1) {
          cout << i << " " << j << " ";
        } else {
          cout << i << " " << m - j + 1 << " ";
        }
      }
    return 0;
  }
  cout << "2 ";
  for (int i = 1; i <= (n); i++)
    for (int j = 1; j <= (m); j++) {
      if (i % 2 == 1) {
        cout << i << " " << j << " ";
        x++;
        ans++;
      } else {
        cout << i << " " << m - j + 1 << " ";
        x++;
        ans++;
      }
      if (x == 2 && f) {
        x = 0;
        y++;
        if (y != k - 1) cout << "\n2 ";
      }
      if (y == k - 1 && f != 0) {
        f = 0;
        cout << "\n" << m * n - ans << " ";
      }
    }
}
