#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
void solve() {
  vector<long long> a(4);
  for (int i = 0; i < 4; i++) cin >> a[i];
  sort(a.begin(), a.end());
  for (int i = 0; i < 3; i++) cout << a[3] - a[i] << " ";
  cout << endl;
  return;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  solve();
  return 0;
}
