#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int g[4];
  int i = 0;
  for (i = 0; i < 4; i++) {
    cin >> g[i];
  }
  sort(g, g + 4);
  long long a = 0, b = 0, c = 0, k = 0;
  k = g[3];
  a = g[0];
  b = g[1];
  c = g[2];
  cout << (a + c) - k << " " << (a + b) - k << " " << (b + c) - k;
  return 0;
}
