/*
ID:superlo1
LANG:C++
TASK:milk3
*/
#include <stdio.h>
#include <string.h>
int a, b, c;
int ans[21];
bool h[21][21][21];
void change(int &a, int &b, int maxa, int maxb)
{
if(a + b <= maxb)
{
b = a + b;
a = 0;
}else
if(a + b > maxb)
{
a -= maxb - b;
b = maxb;
}
}
void dfs(int pa,int pb, int pc)
{
if(h[pa][pb][pc]) return;
h[pa][pb][pc] = 1;
if(pa == 0) ans[pc] = 1;
int na = pa, nb = pb, nc = pc;
change(na, nb, a, b);
dfs(na, nb, pc);
na = pa, nb = pb, nc = pc;
change(na, nc, a, c);
dfs(na, pb, nc);
na = pa, nb = pb, nc = pc;
change(nb, nc, b, c);
dfs(pa, nb, nc);
na = pa, nb = pb, nc = pc;
change(nc, nb, c, b);
dfs(pa, nb, nc);
na = pa, nb = pb, nc = pc;
change(nb, na, b, a);
dfs(na, nb, pc);
na = pa, nb = pb, nc = pc;
change(nc, na, c, a);
dfs(na, pb, nc);
}
int main()
{
freopen("milk3.in","r",stdin);
freopen("milk3.out","w",stdout);
scanf("%d %d %d", &a, &b, &c);
memset(ans, 0, sizeof(ans ));
memset(h,0,sizeof(h));
dfs(0 ,0 ,c);
for(int i = 0; i <= 20; i ++)
{
if(ans[i])
{
printf("%d", i);
if(i != c) printf(" ");
}
}
puts("");
//while(1);
}