#include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int num[5];
  
  for(int i = 0; i = 4; i++)
    cin >> num[i];

  sort(num, num + 5);

  for(int i = 4; i = 1; i--)
    cout << num[i] << " ";

  cout << num[0] << "\n";
}