Valera has got a rectangle table consisting of *n* rows and *m* columns. Valera numbered the table rows starting from one, from top to bottom and the columns – starting from one, from left to right. We will represent cell that is on the intersection of row *x* and column *y* by a pair of integers (*x*, *y*).

Valera wants to place exactly *k* tubes on his rectangle table. A tube is such sequence of table cells (*x*<sub class="lower-index">1</sub>, *y*<sub class="lower-index">1</sub>), (*x*<sub class="lower-index">2</sub>, *y*<sub class="lower-index">2</sub>), ..., (*x*<sub class="lower-index">*r*</sub>, *y*<sub class="lower-index">*r*</sub>), that: 
 -  *r* ≥ 2; -  for any integer *i* (1 ≤ *i* ≤ *r* - 1) the following equation |*x*<sub class="lower-index">*i*</sub> - *x*<sub class="lower-index">*i* + 1</sub>| + |*y*<sub class="lower-index">*i*</sub> - *y*<sub class="lower-index">*i* + 1</sub>| = 1 holds; -  each table cell, which belongs to the tube, must occur exactly once in the sequence. 
Valera thinks that the tubes are arranged in a fancy manner if the following conditions are fulfilled: 
 -  no pair of tubes has common cells; -  each cell of the table belongs to some tube. 
Help Valera to arrange *k* tubes on his rectangle table in a fancy manner.
The first line contains three space-separated integers *n*, *m*, *k* (2 ≤ *n*, *m* ≤ 300; 2 ≤ 2*k* ≤ *n*·*m*) — the number of rows, the number of columns and the number of tubes, correspondingly.
import time,math,bisect,sys
from sys import stdin,stdout
from collections import deque
from fractions import Fraction
from collections import Counter
from collections import OrderedDict
pi=3.14159265358979323846264338327950
def II(): # to take integer input
    return int(stdin.readline())
def IO(): # to take string input
    return stdin.readline()
def IP(): # to take tuple as input
    return map(int,stdin.readline().split())
def L(): # to take list as input
    return list(map(int,stdin.readline().split()))
def P(x): # to print integer,list,string etc..
    return stdout.write(str(x))
def PI(x,y): # to print tuple separatedly
    return stdout.write(str(x)+" "+str(y)+"\n")
def lcm(a,b): # to calculate lcm
    return (a*b)//gcd(a,b)
def gcd(a,b): # to calculate gcd
    if a==0:
        return b
    elif b==0:
        return a
    if a>b:
        return gcd(a%b,b)
    else:
        return gcd(a,b%a)
def readTree(): # to read tree
    v=int(input())
    adj=[set() for i in range(v+1)]
    for i in range(v-1):
        u1,u2=In()
        adj[u1].add(u2)
        adj[u2].add(u1)
    return adj,v
def bfs(adj,v): # a schema of bfs
    visited=[False]*(v+1)
    q=deque()
    while q:
        pass
def sieve():
    li=[True]*1000001
    li[0],li[1]=False,False
    for i in range(2,len(li),1):
        if li[i]==True:
            for j in range(i*i,len(li),i):
                li[j]=False
    prime=[]
    for i in range(1000001):
        if li[i]==True:
            prime.append(i)
    return prime
def setBit(n):
    count=0
    while n!=0:
        n=n&(n-1)
        count+=1
    return count
#####################################################################################
def solve():
    n,m,k=IP()
    if (m//2)*n>=k:
        cnt=0
        li=[]
        ho=False
        for i in range(n):
            l=[]
            for j in range(0,m-1,2):
                if (m-(j+2))==1:
                    x=[i+1,j+1,i+1,j+2,i+1,j+3]
                else:
                    x=[i+1,j+1,i+1,j+2]
                cnt+=1
                l.extend(x)
                if cnt>=(k-1):
                    ho=True
                    last=x
                    break
            l.insert(0,len(l)//2)
            li.append(l)
            if ho==True:
                break
        if last[-1]==m:
            if k==1:
                li.pop()
                x=0
            else:
                x=last[0]
            l=[]
            for i in range(x,n,1):
                for j in range(m):
                    l.append(i+1)
                    l.append(j+1)
            l.insert(0,len(l)//2)
            li.append(l)
        else:
            if k==1:
                li.pop()
                x=0
            else:
                x=last[0]
            y=last[-1]
            l=[]
            for j in range(y,m):
                li[-1].append(x)
                li[-1].append(j+1)
            li[-1][0]=li[-1][0]+1
            for i in range(x,n,1):
                for j in rang(m):
                    l.append(i+1)
                    l.append(j+1)
            l.insert(0,len(l)//2)
            li.append(l)
    else:
        cnt=0
        li=[]
        ho=False
        for j in range(m):
            l=[]
            for i in range(0,n-1,2):
                if (n-(j+2))==1:
                    x=[i+1,j+1,i+2,j+1,i+3,j+1]
                else:
                    x=[i+1,j+1,i+2,j+1]
                cnt+=1
                l.extend(x)
                if cnt==(k-1):
                    ho=True
                    last=x
                    break
            l.insert(0,len(l)//2)
            li.append(l)
            if ho==True:
                break
        if last[-2]==n:
            y=last[-1]
            l=[]
            for j in range(y,n,1):
                for i in rang(n):
                    l.append(i+1)
                    l.append(j+1)
            l.insert(0,len(l)//2)
            li.append(l)
        else:
            x=last[0]
            y=last[-1]
            for j in range(x,n):
                li[-1].append(j+1)
                li[-1].append(y)
            li[-1][0]=li[-1][0]+1
            l=[]
            for j in range(y,n,1):
                for i in rang(m):
                    l.append(i+1)
                    l.append(j+1)
            l.insert(0,len(l)//2)
            li.append(l)
    for ele in li:
        print(*ele)
solve()