#include <bits/stdc++.h>
using namespace std;
int max(int a, int b, int c, int d) {
  int m;
  m = a;
  if (m < b) m = b;
  if (m < c) m = c;
  if (m < d) m = d;
  return m;
}
int main() {
  int x1, x2, x3, x4;
  cin >> x1;
  cin >> x2;
  cin >> x3;
  cin >> x4;
  int s;
  s = max(x1, x2, x3, x4);
  if (s == x1) {
    cout << x2 + x3 - s << " ";
    cout << x2 + x4 - s << " ";
    cout << x3 + x4 - s << " ";
  }
  if (s == x2) {
    cout << x1 + x3 - s << " ";
    cout << x1 + x4 - s << " ";
    cout << x3 + x4 - s << " ";
  }
  if (s == x3) {
    cout << x2 + x1 - s << " ";
    cout << x2 + x4 - s << " ";
    cout << x1 + x4 - s << " ";
  }
  if (s == x4) {
    cout << x2 + x3 - s << " ";
    cout << x2 + x1 - s << " ";
    cout << x3 + x1 - s << " ";
  }
  return 0;
}
