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