#include <iostream>
using namespace std;
int arr[9];
int result[7];
int result2[7];
void bubblesort(int *arr, int len) {
for (int i = 0; i < len-1; i++) {
for (int j = 0; j < len-i-1; j++) {
if (arr[j] > arr[j + 1]) {
int temp = arr[j];
arr[j] = arr[j + 1];
arr[j + 1] = temp;
}
}
}
}
void is100(int index, int select, int sum) {
if (sum == 100 && index == 7) {
for (int i = 0; i < 7; i++) {
result2[i] = result[i];
}
return;
}
if (index >= 7) {
return;
}
for (int i = select; i < 9; i++) {
result[index] = arr[i];
is100(index+1, i+1, sum + arr[i]);
result[index] = 0;
}
}
int main() {
for (int i = 0; i < 9; i++) {
cin >> arr[i];
}
is100(0, 0, 0);
bubblesort(result2, 7);
for (int i = 0; i < 7; i++) {
cout << result2[i] << endl;
}
return 0;
}