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