#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v;
  for (int i = 1; i <= 4; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  int c = v.back() - v.front();
  int a = v[1] - c;
  int b = v[2] - c;
  cout << a << " " << b << " " << c << endl;
}
