#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[5], maxi, posm;
  for (int i = 1; i <= 4; i++) {
    cin >> a[i];
    maxi = a[1];
    posm = 1;
  }
  for (int i = 1; i <= 4; i++) {
    if (a[i] > maxi) {
      maxi = a[i];
      posm = i;
    }
  }
  for (int i = 1; i <= 4; i++) {
    if (posm != i) cout << maxi - a[i] << " ";
  }
}
