#include <bits/stdc++.h>
int main() {
  int v[4];
  int *e = v + 4;
  for (int *p = v; p != e; p++) scanf("%d", p);
  std::sort(v, e);
  e = v + 3;
  for (int *p = v; p != e; p++) printf("%d\n", v[3] - *p);
}
