#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int arr[4], mx = INT_MIN;
  for (long long int i = 0; i < 4; i++) {
    cin >> arr[i];
    if (arr[i] > mx) mx = arr[i];
  }
  for (long long int i = 0; i < 4; i++) {
    if (arr[i] == mx)
      continue;
    else
      cout << mx - arr[i] << endl;
  }
}
