#include <bits/stdc++.h>
using namespace std;
int main() {
  int ab, bc, ca, abc;
  int temp[4];
  for (int i = 0; i < 4; i++) {
    cin >> temp[i];
  }
  sort(temp, temp + 4);
  ab = temp[0];
  bc = temp[1];
  ca = temp[2];
  abc = temp[3];
  int a, b, c;
  a = abc - bc;
  b = ab - a;
  c = ca - a;
  cout << a << " " << b << " " << c << endl;
}
