#include <bits/stdc++.h>
using namespace std;
int a[10];
int main() {
  for (int i = 1; i <= 4; ++i) scanf("%d", &a[i]);
  sort(a + 1, a + 1 + 4);
  int x1 = a[4] - a[1];
  int x2 = a[4] - a[2];
  int x3 = a[4] - a[3];
  printf("%d %d %d", x1, x2, x3);
  return 0;
}
