#include <bits/stdc++.h>
using namespace std;
int main() {
  int z[5];
  for (int i = 0; i < 4; i++) cin >> z[i];
  sort(z, z + 4);
  int a = z[3] - z[0];
  int b = z[3] - z[2];
  int c = z[3] - z[1];
  cout << a << " " << b << " " << c;
}
