#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  long long sum = (a + b + c + d) / 3;
  if (sum == a)
    cout << sum - b << " " << sum - c << " " << sum - d;
  else if (sum == b)
    cout << sum - a << " " << sum - c << " " << sum - d;
  else if (sum == c)
    cout << sum - a << " " << sum - b << " " << sum - d;
  else
    cout << sum - a << " " << sum - b << " " << sum - c;
}
