#include <bits/stdc++.h>
using namespace std;
const int mod = (int)(1e9 + 7);
vector<int> read(int n) {
  vector<int> v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  return v;
}
long long int test = 0;
void solve() {
  long long int i, j, k, m, n, ans = 0, cnt = 0, sum = 0;
  long long int x1, x2, x3, x4;
  cin >> x1 >> x2 >> x3 >> x4;
  vector<long long int> v = {x1, x2, x3, x4};
  sort(v.begin(), v.end());
  cout << v[3] - v[0] << " " << v[1] - (v[3] - v[0]) << " "
       << v[2] - (v[3] - v[0]);
  test++;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int i = 1;
  solve();
  return 0;
}
