#include <bits/stdc++.h>
int main() {
  long int x1, x2, x3, x4;
  scanf("%ld %ld %ld %ld", &x1, &x2, &x3, &x4);
  int max = (x1 > x2)
                ? ((x1 > x3) ? ((x1 > x4) ? x1 : x4) : ((x3 > x4) ? x3 : x4))
                : ((x2 > x3)   ? ((x2 > x4) ? x2 : x4)
                   : (x3 > x4) ? x3
                               : x4);
  int a = max - x1;
  int b = max - x2;
  int c = max - x3;
  int d = max - x4;
  if (a != 0) printf("%d ", a);
  if (b != 0) printf("%d ", b);
  if (c != 0) printf("%d ", c);
  if (d != 0) printf("%d ", d);
}
