DFS
import java.io.*;
import java.util.*;
public class Main{
static int N = 21;
static int A, B, C;
static int[] W = new int[3];
static boolean[][][] st = new boolean[N][N][N];
public static void main(String[] args)throws Exception {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] s = br.readLine().split(" ");
A = Integer.parseInt(s[0]);
B = Integer.parseInt(s[1]);
C = Integer.parseInt(s[2]);
W[0] = A; W[1] = B; W[2] = C;
dfs(0,0,C);
for(int c = 0; c <= C; c ++){
for(int b = 0; b <= B; b ++){
if(st[0][b][c]) System.out.print(c + " ");
}
}
}
static void dfs(int a, int b, int c){
if(st[a][b][c]) return;
st[a][b][c] = true;
for(int i = 0; i < 3; i ++){
for(int j = 0; j < 3; j ++){
int[] w = {a, b, c};
if(i != j){
int r = Math.min(w[i], W[j] - w[j]);
w[i] -= r; w[j] += r;
if(!st[w[0]][w[1]][w[2]]){
dfs(w[0],w[1],w[2]);
}
}
}
}
}
}
BFS
import java.io.*;
import java.util.*;
public class Main{
static int N = 30;
static int[] W = new int[5];
static int[] w = new int[5];
static PII[] q = new PII[N * N * N];
static boolean[][][] st = new boolean[N][N][N];
static int A, B, C;
static void bfs(){
st[0][0][C] = true;
int hh = 0;
int tt = 0;
q[0] = new PII(0, 0, C);
while(hh <= tt){
PII t = q[hh ++];
for(int i = 0; i < 3; i ++){
for(int j = 0; j < 3; j ++){
if(i != j){
w[0] = t.a;
w[1] = t.b;
w[2] = t.c;
int tmp = Math.min(w[i], W[j] - w[j]);
w[i] -= tmp;
w[j] += tmp;
if(!st[w[0]][w[1]][w[2]]){
st[w[0]][w[1]][w[2]] = true;
q[++ tt] = new PII(w[0], w[1], w[2]);
}
}
}
}
}
}
public static void main(String[] args)throws Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] s1 = br.readLine().split(" ");
A = W[0] = Integer.parseInt(s1[0]);
B = W[1] = Integer.parseInt(s1[1]);
C = W[2] = Integer.parseInt(s1[2]);
bfs();
for(int c = 0; c <= C; c ++){
for(int b = 0; b <= B; b ++){
if(st[0][b][c]) System.out.print(c + " ");
}
}
}
}
class PII{
int a;
int b;
int c;
public PII(int a, int b, int c){
this.a = a;
this.b = b;
this.c = c;
}
}