#include <bits/stdc++.h>
using namespace std;
int a[5];
int main() {
  for (int i = 0; i < 4; i++) scanf("%d", &a[i]);
  sort(a, a + 4);
  for (int i = 2; i >= 0; i--) cout << a[3] - a[i] << " ";
  cout << endl;
  return 0;
}
