#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long i, j, n, m, q, a = 0, t, b, c, temp;
  long arr[4];
  for (i = 0; i < 4; i++) cin >> arr[i];
  sort(arr, arr + 4);
  a = (arr[0] + arr[1] - arr[2]) / 2;
  b = (arr[0] + arr[2] - arr[1]) / 2;
  c = arr[3] - a - b;
  cout << a << " " << b << " " << c;
  return 0;
}
