public static void main(String... args) throws IOException {
        MyScanner sc = new MyScanner();
        int h = sc.nextInt();
        int w = sc.nextInt();
        int k = sc.nextInt();

        int counter = 0;
        int max = 0;
        int a = 1;
        int b = 1;
        int t = 1;
        for (int i = 1; i <= w * h; i++) {
            if (counter == max) {
                max = (k == 1) ? w * h - i + 1 : 2;
                counter = 0;
                k--;
            }
            if (counter == 0) {
                if (i != 1){
                    System.out.println();
                }
                System.out.print( + max + " ");
            }
            
            System.out.print(a + " " + b + " ");
            b += t;
            
            if (b == 0 || b == w + 1){
                a++;
                t *= -1;
                b += t;
            }
            counter++;
        }
        System.out.println();
    }