#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  vector<long long> v(4);
  for (long long i = 0; i < 4; i++) {
    cin >> v[i];
  }
  sort(v.begin(), v.end());
  for (long long i = 0; i < 3; i++) {
    cout << v[3] - v[i] << " ";
  }
}
