#include<bits/stdc++.h>
using namespace std;
bool a[30][30],b[30];
int n,m,k;
void dfs(int x,int y,int z){
if(a[x][y]) return;
if(!x) b[z] = 1;
a[x][y] = 1;
int t = min(z,n-x);
if(z)dfs(x+t,y,z-t);
t = min(z,m-y);
if(z)dfs(x,y+t,z-t);
t = min(x,m-y);
if(x)dfs(x-t,y+t,z);
t = min(x,k-z);
if(x)dfs(x-t,y,z+t);
t = min(n-x,y);
if(y)dfs(x+t,y-t,z);
t = min(k-z,y);
if(y)dfs(x,y-t,z+t);
}
int main(){
cin >> n >> m >> k;
dfs(0,0,k);
for(int i=0;i<=k;i++)
if(b[i]) cout << i << " ";
}