#include <bits/stdc++.h>
using namespace std;
template <typename T>
void deb(initializer_list<T> l) {
  for (auto &e : l) cout << e << ' ';
  cout << '\n';
}
void solve() {
  vector<long long> e(4);
  for (auto &g : e) cin >> g;
  sort(e.begin(), e.end());
  cout << e[3] - e[0] << ' ' << e[3] - e[1] << ' ' << e[3] - e[2] << '\n';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int t{1};
  while (t--) solve();
  return 0;
}
