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