#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, t;
  int n[4];
  for (int i = 0; i < 4; i++) {
    cin >> n[i];
  }
  for (int i = 0; i < 4; i++) {
    for (int j = 0; j < 3 - i; j++) {
      if (n[j] > n[j + 1]) {
        t = n[j];
        n[j] = n[j + 1];
        n[j + 1] = t;
      }
    }
  }
  a = n[0] - n[2];
  a = (n[1] + a) / 2;
  c = (n[1] - a);
  b = (n[0] - a);
  cout << a << ' ' << b << ' ' << c;
  return 0;
}
