#include <bits/stdc++.h>
using namespace std;
int mx(int a[]) {
  int m = 0, n;
  for (int i = 0; i < 4; i++) {
    if (m < a[i]) {
      m = a[i];
      n = i;
    }
  }
  return n;
}
int main() {
  int x[4], m, ar[3], j = 0;
  for (int i = 0; i < 4; i++) {
    cin >> x[i];
  }
  m = mx(x);
  for (int i = 0; i < 4; i++) {
    if (i == m) continue;
    ar[j++] = x[i];
  }
  cout << (ar[0] + ar[1] - ar[2]) / 2 << " ";
  cout << (ar[0] + ar[2] - ar[1]) / 2 << " ";
  cout << (ar[1] + ar[2] - ar[0]) / 2;
  return 0;
}
