import java.io.*;
import java.util.*;
public class Main {
static int[] numbers;
static StringBuilder sb = new StringBuilder();
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int[] nan = new int[9];
numbers = new int[7];
for (int i = 0; i < 9; i++) {
nan[i] = Integer.parseInt(br.readLine());
}
combination(0, 0, nan);
System.out.println(sb.toString());
}
static void combination(int cnt, int start, int[] nan) {
if (cnt == 7) {
int sum = 0;
for (int i = 0; i < numbers.length; i++) {
sum += numbers[i];
}
if (sum == 100) {
for (int i = 0; i < numbers.length; i++) {
sb.append(numbers[i]).append("\n");
}
return;
}
return;
}
for (int i = start; i < nan.length; i++) {
numbers[cnt] = nan[i];
combination(cnt + 1, i + 1, nan);
}
}
}