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