#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, x2, x3, x4, a, b, c, d, maxi;
  cin >> x1 >> x2 >> x3 >> x4;
  maxi = max(x1, x2);
  maxi = max(maxi, x3);
  maxi = max(maxi, x4);
  a = maxi - x1;
  b = maxi - x2;
  c = maxi - x3;
  d = maxi - x4;
  if (a == 0) {
    cout << b << " " << c << " " << d << endl;
  } else if (b == 0) {
    cout << a << " " << c << " " << d << endl;
  } else if (c == 0) {
    cout << a << " " << b << " " << d << endl;
  } else if (d == 0) {
    cout << a << " " << b << " " << c << endl;
  }
  return 0;
}
