Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	scanner.Split(bufio.ScanWords)
	nums := make([]int, 5)
	for i := 0; i < 5; i++ {
		nums[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(nums)))
	for i, v := range nums {
		if i == len(nums)-1 {
			fmt.Printf("%d\n", v)
		} else {
			fmt.Printf("%d ", v)
		}
	}
}

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

int main()
{
	int a[5];
	for (int i = 0; i < 5; i++)
	{
		cin >> a[i];
	}
	for (int i = 0; i < 5; i++)
	{
		int x,y;
		x = i;
		y = a[i];
		for (int I = i+1; I < 5; I++)
		{
			if (a[I] > y)
			{
				y = a[I];
				x = I;
			}
		}
		int s=a[i];
		a[i] = a[x];
		a[x] = s;
	}
	for (int i = 0; i < 5; i++)
	{
		cout << a[i];
		if (i != 4)cout << " ";
	}
	cout << endl;
}

C++: #include<iostream>
int main()
{
	int n[5];
	for (int i = 0; i < 5; i++)
	{
		std::cin >> n[i];
	}
	for (int i = 0; i < 5; i++)
	{
		int max = -100001, max_index = 0;
		for (int j = i; j < 5; j++)
		{
			if (max < n[j])
			{
				max = n[j];
				max_index = j;
			}
		}
		std::swap(n[i], n[max_index]);
	}
	for (int i = 0; i < 5; i++)
	{
		std::cout << n[i] << ' ';
	}
	std::cout << std::endl;
	return 0;
}

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

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

int main() {
    int a, b, c, d, e;
    cin >> a >> b >> c >> d >> e;
    list<int> lis = {a, b, c, d, e};
    lis.sort(greater<int>());
    list<int>::iterator it = lis.begin();
    while(it != lis.end()) {
        cout << *it << flush;
        it++;
    }
    cout << endl;
    return 0;
}

C++: #include <stdio.h>

int main(void) {
  int a[5], i, j, t;
  for(i = 0; i < n; ++i) scanf("%d", &a[i]);
  for(i = 0; i < n; ++i) for(j = i + 1; j < n; ++j) if(a[i] < a[j]) t = a[i], a[i] = a[j], a[j] = t;
  for(i = 0; i < 4; ++i) printf("%d ", a[i]);
  printf("%d\n", a[4]);
  return 0;
}

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

int main(){
int a;
int b[5];
int c;
int d;
int e;
c=0;
while(c<5){
b[c]=0;
c=c+1;
}
c=0;
while(c<5){
cin >>a;
d=0;
while(1){if(a>=b[d]){e=3; if(e>=d){while(e>=d){b[e+1]=b[e]; e=e-1;}} b[d]=a; break;} d=d+1;     }
c=c+1;
}
c=0;
while(c<5){
cout << b[c]
if(c<4){cout <<" "}
c=c+1;}


}

C++: *a=&a;main(i){*a=~scanf("%d",++a)?!printf(i?"%d\n":"%d ",*--a,main(0)):qsort(a-5,5,4,"YXZRPQ\213\0+\2テδ。");}

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

int main(){
	int a[5];
	int tmp;
	for(int i=0; i<5 ; i++){
		cin >> a[i];
	}
	for(int j=0;j<4;j++){
		for(int k=j+1;k<5;k++){
			if(a[j]<a[k]){
				tmp = a[j];
				a[j] = a[k];
				a[k] = tmp;
			}
		}
	}

	for(int l =0; l<5 ; l++) {
		cout << a[l] << " ";
	}
	cout << "\n";
}

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

using namespace std;

int main()
{
	vector<int> a(5);
	for (int i = 0; i < a.size(); ++i)
		cin >> a[i];

	sort(a.begin(), a.end(), greater<int>());

	cout << a[0];
	for (int i = 1; i < a.size(); ++i)
		cout << " " << a[i];
	cout << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,l,n) for(int i=l;i<n;i++)
using namespace std;

int main(){
	int data[10]={};
	rep(i,0,5) cin>>data[i];
	sort(data,data+5);
	reverse(data,data+5);
	rep(i,0,4) cout<<data[i]<<" ";
	cout<<data[4]<<endl;
}

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

using namespace std;

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

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

int main()
{
	std::array<int,5> v;
	std::cin >> v[0] >> v[1] >> v[2] >> v[3] >> v[4];
	std::sort( v.begin(), v.end(), std::greater<int>() );
	std::cout << v[0] << ' ' << v[1] << ' ' << v[2] << ' ' << v[3] << ' ' << v[4] << '\n';
}

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

using namespace std;

int main(void) {
	vector<int> a(5, 0);
	
	for (int i = 0; i < 5; i++){
		cin >> a[i];
	}

	sort(a.begin(), a.end(), greater<int>());

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

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
    int a[5];
    for(int i=0; i<5; i++)
        scanf("%d",a+i);
    sort(a,a+5);
    printf("%d",a[4]);
    for(int i=3; i>=0; i--)
        printf(" %d",a[i]);
    return 0;
}

C++: #include <cstdio>
#include <set>
#include <utility>

int main() {
    std::set<int> s;
    
    int a;
    while (~scanf("%d", &a)) {
       s.insert(a);
    }
    for (auto i = s.rbegin(); i != s.rend(); ++i) {
        printf("%d%c", *i, std::next(i) != s.rend() ? ' ' : '\n');
    }
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;

int main() {
	int n[5];
	for (int i = 0; i != 5; ++i) {
		scanf("%d", &n[i]);
	}
	sort(n, n+5);
	printf("%d %d %d %d %d\n", n[4], n[3], n[2], n[1], n[0]);
	return 0;
}

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

int main()
{
	int a, b, c, d, e, a[6], i, j;
	cin >> a >> b >> c >> d >> e;
	a[0] = a;
	a[1] = b;
	a[2] = c;
	a[3] = d;
	a[4] = e;
	for ( j = 0;j < 5; j++)
	{	for ( i = 0;i < 5; i++)
		{
			if (a[i] >= a[i + 1])a[i + 1] = a[i];
		}
	}
	cout << a[0] << " " <<a[1] << " " << a[2] << " " << a[3] << " " << a[4] << endl;
return 0;
}

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

using namespace std;

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

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

int main(){
    int arr[5];

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

    for(int i=0; i<4; i++){
        for(int j=i+1; j<5; j++){
            if(arr[i]<arr[j]){
                int temp;
                temp = arr[i];
                arr[i] = arr[j];
                arr[j] = temp;
            }
        }
    }

    for(int i=0; i<5; i++){
        cout << arr[i] << ' ';
    }
return 0;
}

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

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

C++: 
#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <utility>
#include <complex>
#include <stack>

using namespace std;

typedef complex<double> P;

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

	}
	sort(a,a+5);

	for (int i = 0; i < 5; i++)
	{
		printf("%d%c",a[4-i],(i == 4) ? '\n' : ' ');
	}

	return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define yesno(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define MAX_N 1002
#define i197 1000000007

using namespace std;
typedef long long ll;
typedef pair<ll,ll> P1;
typedef pair<int,int> Pi;
typedef pair<double,Pi> Pdi;
typedef pair<ll,int>Pli;
typedef pair<P1,ll> P2;
typedef pair<string,string> Ps;
const ll INF=1000000000000000001;
struct edge{int to,cost;};
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
struct Road{double cost;int a,b;};
struct pos{
	// 1 変数を入れる;
	int x,y,sx,sy,cost;
};

int main() {

	int a[6];
	cin>>a[0]>>a[1]>>a[2]>>a[3]>>a[4];
	sort(a,a+5,greater<int>());
	rep(i,4)cout<<a[i]<<" ";
	cout<<a[4]<<endl;

	return 0;
}