#include <bits/stdc++.h>
int main() {
  int a[5], maxx = -1, k;
  for (int i = 0; i < 4; i++) {
    scanf("%d", &a[i]);
    if (maxx < a[i]) {
      maxx = a[i];
      k = i;
    }
  }
  for (int i = 0; i < 4; i++) {
    if (k == i) continue;
    printf("%d ", maxx - a[i]);
  }
  printf("\n");
}
