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