#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long double EPS = 1e-9;
long long int pow(long long int a, long long int b, long long int mod) {
  long long int ans = 1;
  while (b > 0) {
    if (b % 2 == 1) {
      ans = ans * a;
    }
    a = (a * a) % mod;
    b = b / 2;
  }
  return ans;
}
void solve() {
  int n, m, k;
  cin >> n >> m >> k;
  int j;
  int cnt = 0;
  int a, b, th;
  int it = 1;
  int no = (m * n) / k;
  cout << no << " ";
  for (long long int i = 1; i <= n; ++i) {
    if (i % 2 == 1) {
      for (long long int j = 1; j <= m; ++j) {
        cnt++;
        if (cnt == no + 1) {
          it++;
          cout << '\n';
          if (it < k) {
            cnt = 1;
          } else {
            no = m - j + 1 + (n - i) * m;
            cnt = 0;
          }
          cout << no << " ";
        }
        cout << i << " " << j << " ";
      }
    } else {
      for (int j = m; j > 0; j--) {
        cnt++;
        if (cnt == no + 1) {
          it++;
          cout << '\n';
          if (it < k) {
            cnt = 1;
          } else {
            no = j + (n - i) * m;
            cnt = 0;
          }
          cout << no << " ";
        }
        cout << i << " " << j << " ";
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int test_Cases = 1;
  while (test_Cases--) {
    solve();
  }
}
