#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b, c, d, t;
  cin >> a >> b >> c >> d;
  t = (a + b + c + d) / 3;
  a = t - a;
  if (a != 0) cout << int(a) << " ";
  b = t - b;
  if (b != 0) cout << int(b) << " ";
  c = t - c;
  if (c != 0) cout << int(c) << " ";
  d = t - d;
  if (d != 0) cout << int(d) << " ";
  return 0;
}
