#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a[4];
  for (int i = 0; i < 4; i++) cin >> a[i];
  sort(a, a + 4, greater<int>());
  for (int i = 1; i < 4; i++) cout << a[0] - a[i] << " ";
}
