text: #include <bits/stdc++.h>
  
  using namespace std;
  
  #define g0 get<0>
  #define g1 get<1>
  
  typedef int64_t i64;
  typedef int32_t i32;
  typedef uint64_t u64;
  typedef uint32_t u32;
  typedef string st;
  typedef stringstream ss;
  
  typedef double db;
  
  typedef vector<i64> vl;
  typedef vector<i32> vi;
  typedef vector<char> vc;
  typedef vector<db> vd;
  typedef vector<st> vs;
  
  typedef map<st,i32> st2i;
  typedef map<st,i64> st2l;
  typedef map<st,db> st2d;
  
  typedef map<i64,i64> l2l;
  typedef map<i64,i32> l2i;
  
  typedef map<i32,i32> i2i;
  typedef map<i32,i64> i2l;
  
  #define DEBUG
  
  #ifdef DEBUG
  #define dbg(var) {cerr << __LINE__ <<": "<< #var <<" = "<< var << std::endl;}
  #else
  #define dbg(var)
  #endif
  
  
  inline ss in_line()
  {
      st line;
      getline(cin, line);
      return ss(line);
  }
  
  
  int main()
  {
      ios::sync_with_stdio(false);
  
      vl v(4);
      cin >> v[0];
      cin >> v[1];
      cin >> v[2];
      cin >> v[3];
      sort(v.begin(), v.end());
  
      u64 a = v[0] + v[1] - v[3];
      u64 b = v[0] + v[2] - v[3];
      u64 c = v[1] + v[2] - v[3];
  
      cout << a << " " << b << " " << c;
  
      return 0;
  }
  