#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int x[4];
  for (int i = 0; i < 4; i++) cin >> x[i];
  int max = x[0], num = 0;
  for (int i = 1; i < 4; i++)
    if (x[i] > max) {
      max = x[i];
      num = i;
    }
  int cont = 0;
  int a = (num != 0 ? max - x[cont] : max - x[++cont]);
  cont++;
  int b = (num != 1 ? max - x[cont] : max - x[++cont]);
  cont++;
  int c = (num != 2 ? max - x[cont] : max - x[++cont]);
  cout << a << " " << b << " " << c << endl;
}
