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