#include <bits/stdc++.h>
int main() {
  long long int m, i, a[4];
  while (scanf("%lld%lld%lld%lld", &a[0], &a[1], &a[2], &a[3]) == 4) {
    m = a[0];
    for (i = 0; i < 4; i++) {
      if (a[i] > m) m = a[i];
    }
    for (i = 0; i < 4; i++) {
      a[i] = m - a[i];
      if (a[i] > 0) printf("%lld ", a[i]);
    }
    printf("\n");
  }
}
