#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  int maks = max(a, b);
  maks = max(maks, c);
  maks = max(maks, d);
  if (maks == d) {
    cout << d - a << " " << d - b << " " << d - c;
  } else if (maks == c) {
    cout << c - a << " " << c - b << " " << c - d;
  } else if (maks == b) {
    cout << b - a << " " << b - c << " " << b - d;
  } else {
    cout << a - b << " " << a - c << " " << a - d;
  }
}
