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