#include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;

int main(){

  int i;
  int a[5]={0};

  for(i=0;i<5;i++){
    scanf("%d",&a[i]);
  }

  sort(a,a+5,greater<int>());

  printf("%d %d %d %d %d\n",a[0],a[1],a[2],a[3],a[4]);

  return 0;
}