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