#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5;
const long double pi = 3.14159265358979323846;
const long long INF = 1e9 + 1;
const long double eps = 1e-18 + 1;
long long a[5];
int main() {
  for (int i = 1; i <= 4; i++) {
    cin >> a[i];
  }
  sort(a + 1, a + 4 + 1);
  int n = a[4] - a[3];
  int b = a[4] - a[2];
  int c = a[4] - a[1];
  cout << b << ' ' << n << ' ' << c;
  return 0;
}
