#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[10];
  cin >> arr[0] >> arr[1] >> arr[2] >> arr[3];
  sort(arr, arr + 4);
  int b = (arr[0] - arr[1] + arr[2]) / 2;
  int a = arr[0] - b;
  int c = arr[2] - b;
  cout << a << " " << b << " " << c << endl;
  return 0;
}
