#include <bits/stdc++.h>
using namespace std;
const double PI = 3.141592653589793238463;
const int INF = 0x3f3f3f3f;
const int mod = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  vector<long long> x(4);
  cin >> x[0] >> x[1] >> x[2] >> x[3];
  sort(x.begin(), x.end());
  cout << x[3] - x[0] << ' ' << x[3] - x[1] << ' ' << x[3] - x[2] << endl;
  return 0;
}
