#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, m, k, ob;
  cin >> n >> m >> k >> ob;
  long long t = max(max(max(n, m), k), ob);
  if (t - n != 0) {
    cout << t - n << " ";
  }
  if (t - m != 0) {
    cout << t - m << " ";
  }
  if (t - k != 0) {
    cout << t - k << " ";
  }
  if (t - ob != 0) {
    cout << t - ob << " ";
  }
  return 0;
}
