#include <bits/stdc++.h>
int number[4];
int q;
int largest;
int main() {
  for (int i = 0; i < 4; i++) {
    scanf("%d", &number[i]);
    if (i == 0) {
      largest = number[i];
    } else {
      if (number[i] > largest) {
        largest = number[i];
      }
    }
  }
  for (int i = 0; i < 4; i++) {
    if (number[i] == largest) {
      ;
    } else {
      printf("%d ", largest - number[i]);
    }
  }
  return 0;
}
