#include <bits/stdc++.h>
using namespace std;
int getint() {
  unsigned int c;
  int x = 0;
  while (((c = getchar()) - '0') >= 10) {
    if (c == '-') return -getint();
    if (!~c) exit(0);
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while (((c = getchar()) - '0') < 10);
  return x;
}
int getstr(char str[]) {
  int c, n = 0;
  while ((c = getchar()) <= ' ') {
    if (!~c) exit(0);
  }
  do {
    str[n++] = c;
  } while ((c = getchar()) > ' ');
  str[n] = 0;
  return n;
}
template <class T>
inline bool chmin(T& a, T b) {
  return a > b ? a = b, 1 : 0;
}
template <class T>
inline bool chmax(T& a, T b) {
  return a < b ? a = b, 1 : 0;
}
int m, n, k;
template <class S, class T, class U>
struct Tuple {
  S s;
  T t;
  U u;
  Tuple() {}
  Tuple(S s, T t, U u) : s(s), t(t), u(u) {}
  bool operator==(const Tuple<S, T, U>& a) const {
    return (s == a.s and t == a.t and u == a.u) ? 1 : 0;
  }
  bool operator!=(const Tuple<S, T, U>& a) const {
    return !this->operator==(a);
  }
};
template <class S>
struct Compare {
  bool operator()(const S& a, const S& b) const {
    if (a.s != b.s) return a.s < b.s;
    if (a.t != b.t) return a.t < b.t;
    if (a.u != b.u) return a.u < b.u;
    return 0;
  }
};
template <class S, class T, class U>
ostream& operator<<(ostream& os, const Tuple<S, T, U>& a) {
  os << '(' << a.s << ' ' << a.t << ' ' << a.u << ')';
  return os;
}
Tuple<int, int, int> next(Tuple<int, int, int> now) {
  if (now.u == 0) {
    now.t++;
    if (now.t >= m) {
      now.t = m - 1, now.s++, now.u = 1;
    }
  } else {
    now.t--;
    if (now.t < 0) {
      now.t = 0, now.s++, now.u = 0;
    }
  }
  return now;
}
int main() {
  int i, j, tcc, tc = 1 << 28;
  for (tcc = 0; tcc < tc; tcc++) {
    n = getint(), m = getint(), k = getint();
    Tuple<int, int, int> now(0, 0, 0);
    for (i = 0; i < k - 1; i++) {
      cout << 2 << ' ';
      for (j = 0; j < 2; j++) {
        cout << now.s + 1 << ' ' << now.t + 1 << ' ';
        now = next(now);
      }
      puts("");
    }
    vector<int> res;
    for (;;) {
      res.push_back(now.s);
      res.push_back(now.t);
      now = next(now);
      if (now.s == n) break;
    }
    cout << res.size() / 2;
    for (i = 0; i < res.size(); i++) cout << ' ' << res[i] + 1;
    puts("");
  }
  return 0;
}
