#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[5];
  for (int i = 0; i < 4; i++) {
    cin >> arr[i];
  }
  int a = *max_element(arr, arr + 4);
  for (int i = 0; i < 4; i++) {
    if (arr[i] != a) {
      cout << a - arr[i] << " ";
    }
  }
  cout << endl;
  return 0;
}
