Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	heights := make([]int, 10)
	for i := 0; i < 10; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}

	sort.Sort(sort.Reverse(sort.IntSlice(heights)))
	for i := 0; i < 3; i++ {
		fmt.Println(heights[i])
	}
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
 
using namespace std;
 
vector<int> heights;
int input;
 
int main(){
 while(cin >> input) heights.push_back(input);
 sort(heights.begin(), heights.end());
 auto itr = heights.end()-1;
 cout << *itr << "\n" << *(itr-1) << "\n" << *(itr-2) << endl;
 
 return 0;
}

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

int main()
{
	int iHigh[10];

	for( int i=0;i<10;i++ ){
		scanf("%d",&iHigh[i]);
	}

	sort( iHigh,iHigh+9,greater <int>() );

	for( int i=0;i<3;i++ ){
		printf("%d\n",iHigh[i]);
	}

	return 0;
}

C++: #include"iostream"

using namespace std;

int main()
{
	int a[10];
	int i,j,temp;
	for(i=0;i<10;i++)
		cin>>a[i];
	for(i=0;i<10;i++)
	{
		for(j=i+1;j<10;j++)
		{
			if(a[i]<a[j])
			{
				temp = a[i];
				a[i] = a[j];
				a[j] = temp;
			}
		}
	}
	for(i=0;i<3;i++)
		cout<<a[i]<<endl;
	return 0;
}

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

using namespace std;
typedef long long ll;
typedef pair<int, int> pint;
#define REP(i, n) for(int i = 0; i < (int)(n); i++)
#define IREP(i, n) for(int i = (int)(n) - 1; i >= 0; i--)
#define ALL(x) (x).begin(), (x).end()
#define MOD 1000000007
#define IMAX INT_MAX
#define IMIN INT_MIN
#define LMAX LLONG_MAX
#define LMIN LLONG_MIN
template<typename T> inline void chmin(T &a, T b){ if(a > b) a = b; }
template<typename T> inline void chmax(T &a, T b){ if(a < b) a = b; }
template<typename T> inline void xch(T &a, T &b){ T w = a; a = b; b = w; }

int main() {
    vector<int> a;
    REP(i, 10){
        int n;
        cin >> n;
        a.push_back(n);
    }
    sort(ALL(a));
    cout << a[9] << endl << a[8] << endl << a[7] << endl;
    
    return 0;
}

C++: #include<stdio.h>
int main(void){
	int i;
	int a[10];
	int x=0, y=0, z=0;
	
	for(i=0;i<10;i++){
		do{
			printf("山の高さ%d(整数)",i+1);
			scanf("%d",&a[i]);
		}while(a[i]<=0||10000<=a[i]);
		
		if(a[i]>x){
			z=y;
			y=x;
			x=a[i];
		}
		else if(a[i]>y){
			z=y;
			y=a[i];
		}
		else if(a[i]>z){
			z=a[i];
		}
	}
	
	printf("%d\n%d\n%d\n",x,y,z);
	
	return 0;
}

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

using namespace std;

int tmp;
vector<int> vec;

int main(){
    for (int i=0; i<10; i++) {
        scanf("%d",&tmp);
        vec.push_back(tmp);
        make_heap(vec.begin(),vec.end());
    }
    for (int i=0; i<3; i++) {
        printf("%d\n",vec.front());
        pop_heap(vec.begin(),vec.end());
        vec.pop_back();
    }
}

C++: #include<stdio.h>
#define SIZE 10

/**
 * 関数宣言
 */
void binarySort(int* datas, int size);

int main(){
	int heights[SIZE];
	int i;
	
	for(i = 0; i < SIZE; i++)
	{
		scanf(" %d", heights+i);
	}
	
	binarySort(heights, SIZE);
	binarySort(heights+1, SIZE-1);
	binarySort(heights+2, SIZE-2);
		
	for(i = 0; i < 3; i++)
	{
		printf("%d\n", heights[i]);
	}
	
	
    return 0;
}

void binarySort(int* datas, int size)
{
	int i;
	int tmp;
	
	for(i = size-1; i >= 0; i--)
	{
		if(datas[i] < datas[i+1])
		{
			tmp = datas[i];
			datas[i] = datas[i+1];
			datas[i+1] = tmp;
		}
	}
	
	return;
}

C++: #include<iostream>
using namespace std;
int main(){
    int work[10];
    int temp;
    for(int i = 0; i < 10; i++){
        cin >> work[i];
    }
    for(int i = 0; i < 9; i++){
        for(j = i + 1; j < 9; j++){
            if(work[i] < work[j]){
                temp = work[i];
                work[i] = work[j];
                work[j] = temp;
            }
        }
    }
    for(int i = 0; i < 3; i++){
        cout << work[i] << endl;
    }
    return 0;
}

C++: #include <iostream>

int main(int argc, char ** argv) {
  int input, top[3] = {0};
  for (int i = 0; i < 10; i++) {
    std::cin >> input;
    if (input >= top[0]) {
      top[2] = top[1];
      top[1] = top[0];
      top[0] = input;
    }else if (input >= top[1]) {
      top[2] = top[1];
      top[1] = input;
    }else if (input >= top[2]) {
      top[2] = input;
    }
  }

  for (int i = 0; i < 3; i++) {
    std::cout << top[i] << std::endl;
  }
}

C++: #include<stdio.h>
#include<algorithm>
#include<functional>

using namespace std;
int main()
{
    int p[10];
    int i;
    for(i=0;i<10;i++)
        scanf("%d",&p[i]);

        sort(p,p+10,greater<int>());

        for(i=0;i<3;i++)

        printf("%d\n",p[i]);
        return 0;

}

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

int main(){
    vector<int> heights(10);;
    for(int i = 0; i < 10; ++i){
        cin >> heights[i];
    }
    sort(heights.begin(), heights.end(), greater<int>());

    for(int i = 0; i < 3; ++i){
        cout << heights[i] << endl;
    }

    return 0;
}

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

int main() {
	int amount = 10;
	vector<int> mountains(10);
	for(int i = 0; i < amount; ++i) {
		cin >> mountains[i];
	}
	
	sort( mountains.begin(), mountains.end() );
	
	for(int i = 9; i > 6; --i) {
		cout << mountains[i] << endl;
	}
}

C++: #include <stdio.h> using namespace std; int main(){ int count[10001],tmp,num=3; for(int i=0;i<10001;i++)count[i]=0; for(int i=0;i<10;i++){ scanf("%d",&tmp); count[tmp]++; } for(int i=10000;i>=0&&num>0;i--){ if(count[i]>0){ for(int k=0;k<count[i]&&num>0;k++){ printf("%d\n",i); num--; } } } return 0; }

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=10, 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(NULL);
    cout.tie(NULL);
    int A[10];

    forr(i,n)
    {
        cin>>A[i];
    }
    sort(A,A+n, greater<>());
    forr(i,3)
    {
        cout<<A[i]<<endl;
    }
    return 0;
}