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