Go: package main

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

var (
	n  = 10
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	heights := make([]int, n, n)
	for i := 0; i < n; 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 <cstdio>
#include <cstdlib>
#include <iostream>

using namespace std;

int num[10];

int cmp(const void *a, const void *b) {
	return *(int *)b - *(int *)a; 
}

int main() {
	while (scanf("%d", &num[0]) != EOF) {
		for (int i=1; i<10; ++i) scanf ("%d", &num[i]);
		qsort(num, 10, sizeof(int), cmp);
		printf ("%d\n%d\n%d\n", num[0], num[1], num[2]);
	}
	return 0;
}

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

using namespace std;

int main() {
	array<int, 10> input;
	for(auto& i : input)
		cin >> i;
	sort(input.begin(), input.end(), greater<int>());
		cout << input[0] << endl
			 << input[1] << endl
			 << input[2] << endl;;
	return 0;
}

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

int main() {
	int 1st, 2nd, 3rd;
	1st=0;
	2nd=0;
	3rd=0;
	int i;
	for(i=1;i<=10;i++){
		if(height of mountain i > 3rd){
			if(height of mountain i > 2nd){
				if(height of mountain i > 1st){
					1st=i;
				}else{
					2nd=i;
				}
			}else{
				3rd=i;
			}
		}
	}
	cout << 1st << endl;
	cout << 2nd << endl;
	cout << 3rd << endl;
	return 0;
}

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

using namespace std;

int main() {
	int mountain[10];
	int m_max[3];
	int MAX;
	int count = 0;
	int n;

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

	MAX = mountain[0];

	while(count != 3){

		for(int i = 0; i < 10; i++) {
			if(MAX < mountain[i]) {
				MAX = mountain[i];
				n = i;
			}
		}

		m_max[count] = MAX;
		count++;
		mountain[n] = 0;
		MAX = 0;

	}

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

}

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

int main(){
    int first = 0;
    int second = 0;
    int third = 0;
    int array[10];
    
    for(int i=0; i<10; i++){
        cin >> array[i];
    }
    sort(array, array+10);
    for(int i=9; i>6; i--){
        cout << array[i] << endl;
    }

    return 0;
}

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

C++: #include <iostream>

int main(void){

	int max1=0,max2=0,max3=0;
	int montain[10] = { 1819, 2003, 876, 2840, 1723, 1673, 3776, 2848, 1592, 922 };
	int tmp = 0;

	for (int i = 0; i < 9; i++){
		for (int j = 9; j > i; j--){
			if (montain[j - 1] > montain[j]){
				tmp = montain[j];
				montain[j] = montain[j - 1];
				montain[j - 1] = tmp;
			}
		}
	}

	printf("%d\n%d\n%d\n", montain[9], montain[8], montain[7]);

	return 0;
	
}

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

int main(){
	int height;
	vector<int> heights;
	while(cin >> height)
		heights.push_back(height);
	sort(heights.begin(), heights.end());
	cout << heights[9] << endl;
	cout << heights[8] << endl;
	cout << heights[7] << endl;
	return 0;
}

C++: #include <stdio.h>
int main()
{
  int f=0,s=0,t=0,m,i;
  for(i=0;i<10;i++){
    scanf("%d",&m);
    if(m>f){
      t=s;
      s=f;
      f=m;
    }
    else if(m>s){
      t=s;
      s=m;
    }
    else if(m>t){
      t=m;
    }
  }
  printf("%d\n%d\n%d\n",f,s,t);
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int m[10];
	for(int i=0;i<10;i++) cin >> m[i];
	while(1){
		bool j = true;
		for(int i=0;i<9;i++){
			if(m[i]<m[i+1]){
				int t = m[i];
				m[i] = m[i+1];
				m[i+1] = t;
				j = false;
			}
		}
		if(J) break;
	}
	for(int i=0;i<3;i++) cout << m[i] << endl;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  vector<int> hill(10);
  for(int i=0; i<10; i++) cin >>hill[i];
  sort(hill.begin(),hill.end());
  for(int i=9; i>6; i--) cout <<hill[i]<<endl;
  return 0;
}

C++: #include <stdio.h>

int main(){
  int i, mt[10], max=0, max2=0, max3=0;
  for (i = 0; i < 10; i++){
    scanf("%d", &mt[i]);
    if(max <mt[i]) max = mt[i];
    else if (max2 <mt[i]) max2 = mt[i];
    else if (max3 <mt[i]) max3 = mt[i];
  }
  printf("%d\n%d\n%d\n",max, max2, max3);
  return 0;
}

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

using namespace std;

int num[10];

int main() {
	while (scanf("%d", &num[0]) != EOF) {
		for (int i=1; i<10; ++i) scanf ("%d", &num[i]);
		for (int i=0; i<3; ++i) {
			for (int j=i+1; j<10; ++j) {
				if (num[i] < num[j]) {
					int tmp = num[i];
					num[i] = num[j];
					num[j] = tmp;
				}
			}
		}
		printf ("%d\n%d\n%d\n", num[0], num[1], num[2]);
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int a[10];
	for(int i=0;i<10;i++){
		scanf("%d",&a[i]);
		}
		int first=-1;
		int second=-1;
		int third=-1;
		for(int j=0;j<10;j++){
			if(a[j]>first){
				first=a[j];
			}
			else if(a[j]>second){
				second=a[j];
			}
			else if(a[j]>third){
				third=a[j];
			}
			cout<<first<<endl;
			cout<<second<<endl;
			cout<<third<<endl;
		}
		return 0;
}

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

int main(){
	vector<int> top(3);
	int height;
	while(cin >> height){
		for(vector<int>::iterator itr = top.begin(); itr != top.end(); ++itr){
			if(height > *itr){
				top.insert(itr, height);
				top.pop_back();
				break;
			}
		}
	}
	for(vector<int>::iterator itr = top.begin(); itr != top.end(); ++itr){
		cout << *itr << endl;
	}
	return 0;
}

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

using namespace std;

int main(){
	int a[10],i=0;
	for(;i<10;i++)scanf("%d",&a[i]);
	sort(a,a+10);
	for(i=9;i>6;i--)printf("%d\n",a[i]);
	return 0;
}

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

using namespace std;

int main( void )
{
	// ?????°??£?¨?
	array< int, 10 > array1;

	// ??\?????????
	for ( int i = 0; i < 10; i++ ) {
		cin >> array1[ i ];
	}

	// ???????????????
	for ( int i = 1; i < 10; i++ ) {
		for ( int j = 0; j < i; j++ ) {
			if ( array1[ j ] > array1[ i ] ) {
				int tmp = array1[ i ];
				array1[ i ] = array1[ j ];
				array1[ j ] = tmp;
			}
		}
	}

	// ????????????
	cout << array1[ 9 ] << endl << array1[ 8 ] << endl << array1[ 7 ] << endl;

}

C++: #include<stdio.h>

int main(){
	
	int a[3]={-1,-1,-1},i,b;
	
	for(i=0;i<10;i++){
		
		scanf("%d",&b);
		
		if(b>a[0]){
			
			a[1]=a[0];
			a[0]=b;
		}
		else if(b>a[1]){
			
			a[2]=a[1];
			a[1]=b;
		}
		else if(b>a[2]){
			
			a[2]=b;
		}
	}
	printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
	
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
 
int main(){
    int n;
    vector<int> high;
     
    for(int i=0 ; i<10 ; i++){
        cin >> n;
        high.push_back( n );
    }
     
    sort( high.begin() , high.end() );
 
    for(int i=9 ; i>=7 ; i--){
        cout << high.at( i ) << endl;
    }
}

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

using namespace std;

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

printf("%d\n%d\n%d\n",str[10],str[9], str[8]);
}

C++: #include<iostream>
#include <vector>
#define REP(i,n) for(int i=0;i<(int)n;++i)

using namespace std;

void solver() {
    vector<int> m;
    REP(i,10){
        int n;
        cin>>n;
        m.push_back(n);
    }
    sort(m.begin(),m.end(),greater<int>());
    REP(i,3){
        cout<<m[i]<<endl;
    }
}

int main() {
    solver();
    return 0;
}