#include <bits/stdc++.h>
using namespace std;
const int N = 1e7 + 4;
void FastInputOutput() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
inline long long LLD() {
  long long ret;
  scanf("%lld", &ret);
  return ret;
}
inline int D() {
  int ret;
  scanf("%d", &ret);
  return ret;
}
void bin(int x) {
  if (!x) return;
  bin(x / 2);
  cout << x % 2;
}
long long arr[N];
int main() {
  for (int i = 0; i < 4; ++i) scanf("%lld", arr + i);
  sort(arr, arr + 4);
  long long a = arr[3] - arr[0];
  long long b = arr[3] - arr[1];
  long long c = arr[3] - arr[2];
  printf("%lld %lld %lld", a, b, c);
}
