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----------------------------------------------------------------------------------------------------------------------
#include <bits/stdc++.h>

//using namespace--------------------------------------------------------------------------------------------------------------
using namespace std;

//define-----------------------------------------------------------------------------------------------------------------------
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define INF 1 << 25
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << "\n";
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)

//typedef----------------------------------------------------------------------------------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned int uint;
typedef unsigned long long ull;

//const------------------------------------------------------------------------------------------------------------------------
const double EPS = 1e-10;
const double PI = acos( -1.0 );

//global-----------------------------------------------------------------------------------------------------------------------
int a;
priority_queue<int> ar;
//function---------------------------------------------------------------------------------------------------------------------

int main() {
	rep( i, 10 ) {
		scanf( "%d", &a );
		ar.push( a );
	}
	rep( i, 3 ) {
		printf( "%d\n", ar.top() );
		ar.pop();
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
 
int main()
{
    int A[10],h1,h2,h3,i,pos1,pos2;
    for(i=0;i<10;i++)
    cin>>A[i];
    h1=A[0];
    pos1=0;
    for(i=1;i<10;i++)
    {
        if(A[i]>h1)
        {
            h1=A[i];
            pos1=i;
        }
    }
    A[pos1]=-1;
    h2=A[1];
    pos2=1;
    for(i=2;i<10;i++)
    {
        if(A[i]>h2)
        {
            h2=A[i];
            pos2=i;
        }
    }
    A[pos2]=-1;
    h3=A[2];
    for(i=3;i<10;i++)
    {
        if(A[i]>h3)
            h3=A[i];
    }
    cout<<h1<<"\n"<<h2<<"\n"<<h3;
return 0;
}

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

int main(){

	int str[10];
	int max[3]={0};

	
	for(int j =0; j < 10; j++) {
		if( max[0] < str[j] ) {
			max[0] = str[j];
		}
	}
	for(int j =0; j < 10; j++) {
		if( max[1] < str[j] & str[j] != max[0]) {
			max[1] = str[j];
		}
	}
	for(int j =0; j < 10; j++) {
		if( max[2] < str[j] & str[j] != max[0] & str[j] != max[1]) {
			max[2] = str[j];
		}
	}
	
	printf("%d\n",max[0]);
	printf("%d\n",max[1]);
	printf("%d\n",max[2]);
	
}

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

using namespace std;

int main() {
    int a[10];
    for (int i = 0; i < 10; i++) {
        cin >> a[i];
    }
    sort(a, a + 10);
    for (int i = 9; i >= 7; i--) {
        cout << a[i] << endl;
    }

    return 0;
}

C++: #include<stdio.h>

int main() {
	int A[10];
	int S=0, M=0, L=0;
	int hold;
	for (int i = 0; i < 10; i++) {
		scanf("%d", &A[i]);
	}
	for (int j = 0; j < 10; j++) {
		if (L < A[j]) {
			L = A[j];
			hold = j;
		}
	}
	A[hold] = 0;
	for (int j = 0; j < 10; j++) {
		if (M < A[j]) {
			M = A[j];
			hold = j;
		}
	}
	A[hold] = 0;
	for (int j = 0; j < 10; j++) {
		if (S < A[j]) {
			S = A[j];
		}
	}
	printf("%d\n%d\n%d\n", L, M, S);


	return 0;
}

C++: #include <iostream>

using namespace std;


int main(){
    
//		Scanner input = new Scanner(System.in);
		
		int temp;
		
//		int[] h = new int[10];
	
        int h[10];
        	
		for (int i=0;i<10;i++){
			cout<< "height of mountain " << (i+1) << ": " <<endl ;
			cin>>h[i];
            
         
		}
					for (int j=9;j>0;j--){
					for(int i=0;i<j;i++ )
					if (h[i]<h[i+1]){
						
						temp=h[i+1];
						
						h[i+1]=h[i];
						
						h[i]=temp;}
				}
				
				
                cout<< "heights of the 1st mountain is :" << h[0]<<endl;
                cout<< "heights of the 2nd mountain is :" << h[1]<<endl;
                cout<< "heights of the 3rd mountain is :" << h[2]<<endl;
					

					return 0;
					
                }

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

int main(void){
    int i;
    vector<int> v;
    while(getline(cin, num)){
        v.push_back(num);
    }
    sort(v.begin(), v.end());
    for(int i = 1; i < 4; i++){
        cout << v[v.size - i] << endl;
    }
}

C++: #include <stdio.h>

const int tall[10] = {
	1819,
	2003,
	876,
	2840,
	1723,
	1673,
	3776,
	2848,
	1592,
	922
};

int main(void)
{
	int sort[3] = {0, 0, 0};
	int i;
	
	for(i = 0; i < 10; i++){
		if(tall[i] > sort[0]){
			sort[2] = sort[1];
			sort[1] = sort[0];
			sort[0] = tall[i];
		}
		else if(tall[i] > sort[1]){
			sort[2] = sort[1];
			sort[1] = tall[i];
		}
		else if(tall[i] > sort[2]){
			sort[2] = tall[i];
		}
	}
	printf("%d\n%d\n%d\n", sort[0], sort[1], sort[2]);
	
	return 0;
	
}

C++: #include <bits/stdc++.h>
#define INT(name) int name; scanf("%d",&name);
#define VINT(name,n) vector<int> name(n); for(int i = 0;i < n;i++) scanf("%d",&name[i]);

using namespace std;

int main(int argc, char const *argv[]){
	VINT(height,10)
	sort(height.begin(),height.end(),greater<int>());
	for(int i = 0;i < 3;i++){
		printf("%d\n",height[i]);
	}
	return 0;
}

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

C++: #include <iostream>

using namespace std;

int main(){
    int a[10],i,j,n;
    for(i=0;i<10;i++){
        std::cin>>a[i];
    }for(i=0;i<9;i++){
        for(j=i+1;j<10;j++){
           if(a[i]<a[j]){
              n=a[i];
              a[i]=a[j];
              a[j]=n;
           }
        }
     }
   cout<<a[0]<<endl<<a[1]<<endl<<a[2]<<endl;
                                                  
return 0;
}

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


int main(void){

	int a[11],i,max1,max2,max3;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}


	max1 = 0;
	max2 = 0;
	max3 = 0;

	for (i=1; i<11; ++i){
		if (a[max1] < a[i]){max1 = i;}
	}
		for (i=1;i<11;++i){
			if (a[i] < a[max1]){
				if (a[max2] < a[i]){max2 = i;}
		}
		}
			for (i=1;i<11;++i){
			if (a[i] < a[max2]){
				if (a[max3] < a[i]){max3 = i;}
		}
			}

		cout << a[max1] << endl;
		cout << a[max2] << endl;
		cout << a[max3] << endl;
		

		return 0;
	}