#include <bits/stdc++.h>
int main() {
  int64_t arr[4];
  for (int i = 0; i < 4; i++) {
    std::cin >> arr[i];
  }
  std::sort(arr, arr + 4);
  int64_t a = arr[3] - arr[0];
  int64_t b = arr[3] - arr[1];
  int64_t c = arr[3] - arr[2];
  std::cout << a << " " << b << " " << c << std::endl;
  return 0;
}
