#include <bits/stdc++.h>
int main() {
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  std::multiset<int> set = {a, b, c, d};
  auto it = set.begin();
  printf("%d %d %d", *set.rbegin() - *(it++), *set.rbegin() - *(it++),
         *set.rbegin() - *(it++));
}
