#include <bits/stdc++.h>
using namespace std;
int arr[200009];
vector<int> v;
string s;
int main() {
  int i, n, a, b, ans = 0;
  n = 4;
  for (i = 0; i < n; i++) scanf("%d", &arr[i]);
  sort(arr, arr + n);
  a = arr[3] - arr[0];
  printf("%d ", a);
  b = arr[1] - a;
  printf("%d ", b);
  b = arr[2] - a;
  printf("%d ", b);
  return 0;
}
