Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() int {
	n, err := strconv.Atoi(nextString())
	if err != nil {
		fmt.Printf("strconv.Atoi failed: %v\n", err)
	}
	return n
}

func main() {
	scanner.Split(bufio.ScanWords)

	n := 5
	array := make([]int, n)
	for i := 0; i < n; i++ {
		array[i] = nextInt()
	}
	sort.Slice(array, func(i, j int) bool { return array[i] > array[j] })
	arrayStr := fmt.Sprint(array)
	l := len(arrayStr)
	fmt.Println(arrayStr[1:(l - 1)])
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef pair<ll, int> li;
typedef pair<int, ll> il;
typedef vector<ii> vii;
typedef vector<il> vil;
typedef vector<li> vli;

#define F first
#define S second
#define pb(x) push_back(x)
#define mp(a,b) make_pair(a,b)
#define sz size()
#define all(A)    A.begin(), A.end()
#define mem(a, b) memset(a, b, sizeof(a))
#define f0(i,b)   for(int i=0;i<(b);i++)
#define f1(i,b)   for(int i=1;i<=(b);i++)
#define f2(i,a,b) for(int i=(a);i<=(b);i++)
#define fr(i,b,a) for(int i=(b);i>=(a);i--)
#define rep(i,a,b,c) for(int i=(a);i!=(b);i+=(c))
#define mod 1000000007

#define forr(i,n)    for(i=0; i<n; i++)
#define whilee(i,t)  while(i!=t)
#define  sl(a)  scanf("%lld",&a)
#define  pl(a)  printf("%lld",a)

//for(auto it =A.begin(); it!=A.end(); it++)
//sort(A.begin(),A.end());
//binary_search(A.begin(),A.end(),x);
//reverse(A.begin(), A.end());
//cout << *max_element(A.begin(), A.end());
//cout << *min_element(A.begin(), A.end());
//count(A.begin(), A.end(), X); //counts the occurrences of X
//distance(A.begin(),A.end());  //distance between first to last element
//accumulate(A.begin(), A.end(), 0); //add
//next_permutation(A.begin(), A.end());
//prev_permutation(A.begin(), A.end());
//swap(S[0], T[0]);
//scanf("%d",&x);
//printf("%d\n",x);

vector <int> A;
//deque <int> A;
//queue <int> A;
//stack <int> A;
//set <int> A;
//map <int,int> A;
//pair <int,int> A ;
//vector <pair <int,int>> A ;
//char ch;
//string S, T, U;
ll i, j, k, a, b, c, d, f, g, h, l, m, n, p, q, r, s, t, w, x, y, z, maxx=INT_MIN, minn=INT_MAX, ans=0, sum=0, cnt=0;

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    //cout.tie(nullptr);

    forr(i,5)
    {
        cin>>x;
        A.pb(x);
    }
    sort(all(A),greater<>());
    forr(i,5)
    {
        cout<<A[i]<<" ";
    }
    cout<<endl;
    return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

int main(){
    vector<int> m(5);

    for(int i=0; i<5; i++){
        cin >> m[i];
    }
    sort(m.begin(), m.end(), greater<int>());

    for(int i=0; i<5; i++){
        if(i) cout << " ";
        cout << m[i];
    }
    cout << endl;
    return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;

int main(){

  int v[5];
  
  for(int i=0; i<5; i++){
  	cin >> v[i];
	}

  sort(v, v+5, greater<int>());
  
  for(int i=0; i<5; i++){
  	cout << v[i];
  	if(i != 4)
  		cout << " ";
	}
	cout << endl;
	
  return 0;
}

C++: #include<stdio.h>
#include<algorithm>
int main(){
    int a[5];
    while(~scanf("%d%d%d%d%d",&a[0],&a[1],&a[2],&a[3],&a[4])){
        std::sort(a,a+5);
        for(int i=4;i>0;i--)printf("%d ",a[i]);
        printf("%d\n",a[0]);
    }
}

C++: #include <iostream>

int main(){
	
	int a[5];
	int s[5];
	for(int r=0;r<5;r++){
		s[r]=0;
	}
	for(int b=0;b<5;b++){
		std::cin>>a[b];
		if(a[b]>s[0]){
			s[4]=s[3];
			s[3]=s[2];
			s[2]=s[1];
			s[1]=s[0];
			s[0]=a[b];
		}else if(a[b]>s[1]){
			s[4]=s[3];
			s[3]=s[2];
			s[2]=s[1];
			s[1]=a[b];
		}else if(a[b]>s[2]){
			s[4]=s[3];
			s[3]=s[2];
			s[2]=a[b];
		}else if(a[b]>s[3]){
			s[4]=s[3];
			s[3]=a[b];
		}else{
			s[4]=a[b];
		}
	}
	for(int q=0;q<5;q++){
		std::cout<<s[q]<<" ";
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>

using namespace std;

int main() {
	int n[5];
	for (int i = 0; i < 5; i++)
		cin >> n[i];
	sort(n, n + 5, greater<int>());
	cout << n[0];
	for (int i = 1; i < 5; i++)
		cout << " " << n[i];
	return 0;
}

C++: #include <iostream>
#include<algorithm>
using namespace std;
int main(){
    int a[5];
    for(int i=0;i<5;i++){
        cin>>a[i];
    }
    sort(a,a+5);
    for(int i=4;i>=0;i--){
        if(i==0){
            cout<<a[i]<<endl;
        }
        else{
        cout<<a[i]<<" ";
        }
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main(){
	int a[5];
	for(int S = 0; S < 5; S++){
	cin >> a[S];
	}
	sort(a, a + 5, greater<int>());
	for(int i = 0; i < 5; i++){
		if(i == 4){
			cout << a[i];
		}
		else cout << a[i] << " ";
	}
	cout << endl;
	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int a,b,c,d,e,x[5],t=0;
	scanf("%d %d %d %d %d",&a,&b,&c,&d,&e);

	for(t;t<5;t++)
	if(a>=b&&a>=c&&a>=d&&a>=e)
	{
		x[t]=a;
		a=-1;
	}
	else if(b>=c&&b>=d&&b>=e)
	{
		x[t]=b;
		b=-1;
	}
	else if(c>=d&&c>=e)
	{
		x[t]=c;
		c=-1;
	}
	else if(d>=e)
	{
		x[t]=d;
		d=-1;
	}
	else
	{
		x[t]=e;
		e=-1;
	}

	for(t=0;t<5;t++)
	{
		printf("%d ",x[t]);
	}
	return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
   int num[5];
   int M1 = 0, M2 = 0, M3= 0 , M4= 0 , M5 = 0;
   int I1 = 0, I2 = 0, I3= 0 , I4= 0 , I5 = 0 ;
   cin >> num[0] >> num[1] >> num[2] >> num[3] >> num[4] ;

   for(int i=0 ; i < 5; i++){
      if(M1 < nim[i]) {
          M1 = num[i];
          I1 = i;
       }
    }

    for(int i=0 ; i < 5; i++){
        if(i == I1 ) continue;
        if(M2 < nim[i]) {
           M2 = num[i];
           I2 = i;
        }
     }

for(int i=0 ; i < 5; i++){
if(i == I1 || i == I2 ) continue;
if(M3 < nim[i]) {
M3 = num[i];
I3 = i;
}
}

for(int i=0 ; i < 5; i++){
if( i == I1 || i == I2 || i == I3 ) continue;
if(M4 < nim[i]) {
M4 = num[i];
I4 = i;
}
}

for(int i=0 ; i < 5; i++){
if( i == I1 || i == I2 || i == i3 || i == I4 ) continue;
if(M5 < nim[i]) {
M5 = num[i];
I5 = i;
}
}

cout << M1 << " " << M2 << " " << M3 << " " << M4 << " " << M5 << endl;

return 0 ;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
    int val;
    vector<int> is;
    for (int i = 0; i < 5 && scanf("%d", &val); i++) 
        is.push_back(val);

    sort(is.begin(), is.end());
    for (int i = is.size() - 1; i > 0; i--)
        cout << is[i] << " ";
    cout << is[0] << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <utility>

#define ll (long long)
#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

/*thief??????*/

int main(void){
    
    int array[5] = {0};
    int size = sizeof(array) /sizeof(int);
    cin >> array[0] >> array[1] >> array[2] >> array[3] >> array[4];
    sort(array, array+size);
    RFOR(i, 4, -1) { cout << array[i]; if(i != 0) cout << " "; else cout << endl;}
    return 0;

}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a[5];

int main(){
	for (int i = 0; i < 5; i++){
		cin >> a[i];
	}
	sort(a, a + 5);
	cout << a[4] << " " << a[3] << " " << a[2] << " " << a[1] << " " << a[0] <<" "<< endl;

	getchar();
	getchar();
	return 0;
}

C++: #include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;

int main(void) {
    int a[5];
    for (int i = 0; i < 5; i++) cin >> a[i];
    sort(a, a+5);
    cout << a[4];
    for (int i = 3; i >= 0; i--) {
        cout << " " << a[i];
    }
    cout << endl;
    return 0;
}