#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int a[4];
  long long int maxm = 0;
  long long int index = -1;
  for (int i = 0; i < 4; i++) {
    cin >> a[i];
    if (maxm < a[i]) {
      index = i;
      maxm = a[i];
    }
  }
  for (int i = 0; i < 4; i++) {
    if (i != index) {
      cout << a[index] - a[i] << " ";
    }
  }
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
