#include <bits/stdc++.h>
using namespace std;
int main() {
  int x1, x2, x3, x4;
  cin >> x1 >> x2 >> x3 >> x4;
  int max = x1;
  if (x2 >= max) {
    max = x2;
  }
  if (x3 >= max) {
    max = x3;
  }
  if (x4 >= max) {
    max = x4;
  }
  if (x1 != max) {
    cout << max - x1 << " ";
  }
  if (x2 != max) {
    cout << max - x2 << " ";
  }
  if (x3 != max) {
    cout << max - x3 << " ";
  }
  if (x4 != max) {
    cout << max - x4 << " ";
  }
}
