#include <bits/stdc++.h>
using namespace std;
int main() {
  int x, y, z, n, max1, max2, max3;
  cin >> x >> y >> z >> n;
  max1 = max(x, y);
  max2 = max(z, n);
  max3 = max(max1, max2);
  if (max3 == n) cout << max3 - x << " " << max3 - y << " " << max3 - z;
  if (max3 == x) cout << max3 - y << " " << max3 - z << " " << max3 - n;
  if (max3 == y) cout << max3 - x << " " << max3 - z << " " << max3 - n;
  if (max3 == z) cout << max3 - y << " " << max3 - x << " " << max3 - n;
}
