#include <bits/stdc++.h>
using namespace std;
int main() {
  long long arr[4];
  for (int i = 0; i < 4; i++) cin >> arr[i];
  sort(arr, arr + 4);
  long long w, x, y, z;
  w = arr[0];
  x = arr[1];
  y = arr[2];
  long long a, b, c, d;
  b = (w - x + y) / 2;
  a = w - b;
  c = x - a;
  cout << a << " " << b << " " << c;
  return 0;
}
