// Arup Guha
// 6/21/2023
// Solution to USACO Dec 2020 Bronze Problem: Do you know your ABCs?
// http://www.usaco.org/index.php?page=viewproblem2&cpid=1059

using namespace std;
#include <bits/stdc++.h>

int main() {

    // Read in the numbers and sort.
    vector<int> vals(7);
    for (int i=0; i<7; i++) cin >> vals[i];
    sort(vals.begin(), vals.end());

    // First two numbers are a and b, last number is a+b+c.
    cout << vals[0] << " " << vals[1] << " " << vals[6]-vals[1]-vals[0] << endl;
    return 0;
}
