#include <bits/stdc++.h>
using namespace std;
void solve() {
vector<long long> x(4);
for (int i = 0; i < 4; ++i) {
cin >> x[i];
}
sort(x.begin(), x.end());
// S = x[3] = a + b + c
long long a = x[3] - x[2];
long long b = x[3] - x[1];
long long c = x[3] - x[0];
cout << a << " " << b << " " << c << "\n";
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
solve();
return 0;
}



