#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
int main() {
  int a[4];
  for (int i = 0; i < 4; i++) {
    cin >> a[i];
  }
  sort(a, a + 4);
  int ans, b, c;
  ans = (a[0] + a[1] - a[2]) / 2;
  b = (a[0] - a[1] + a[2]) / 2;
  c = (a[2] - a[0] + a[1]) / 2;
  cout << ans << " " << b << " " << c << endl;
  return 0;
}
