#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int w, x, y, z, num;
  cin >> w >> x >> y >> z;
  num = max(max(w, x), max(y, z));
  if (num - w != 0) cout << num - w << " ";
  if (num - x != 0) cout << num - x << " ";
  if (num - y != 0) cout << num - y << " ";
  if (num - z != 0) cout << num - z;
}
