Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

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

using namespace std;

void Top3Mountains(int m[10])
{
			deque<int> mountains;
			if ( m[0] >= 0 && m[0] <= 10000 )mountains.push_back(m[0]);
			if ( m[1] >= 0 && m[1] <= 10000 )mountains.push_back(m[1]);
			if ( m[2] >= 0 && m[2] <= 10000 )mountains.push_back(m[2]);
			if ( m[3] >= 0 && m[3] <= 10000 )mountains.push_back(m[3]);
			if ( m[4] >= 0 && m[4] <= 10000 )mountains.push_back(m[4]);
			if ( m[5] >= 0 && m[5] <= 10000 )mountains.push_back(m[5]);
			if ( m[6] >= 0 && m[6] <= 10000 )mountains.push_back(m[6]);
			if ( m[7] >= 0 && m[7] <= 10000 )mountains.push_back(m[7]);
			if ( m[8] >= 0 && m[8] <= 10000 )mountains.push_back(m[8]);
			if ( m[9] >= 0 && m[9] <= 10000 )mountains.push_back(m[9]);

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

			deque<int>::iterator it = mountains.begin();

			int i=0;
			for(i=0;i<3; i++){
				cout << *it << endl;
				it++;
			}
	
}

int main()
{
	int m[10] = {1819,2003,876,2840,1723,1673,3776,2848,1592,922};

	Top3Mountains(m);
	return 0;
}

C++: #include<iostream>

int main(){
	
	int h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,k;
	
	std::cin >>h0>>h1>>h2>>h3>>h4>>h5>>h6>>h7>>h8>>h9;
	
	if (h8>h9) k=h8, h8=h9, h9=k;
	
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;
	
	if (h6>h7) k=h6, h6=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;
	
	if (h5>h7) k=h5, h5=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;

	if (h4>h7) k=h4, h4=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;

	if (h3>h7) k=h3, h3=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;	

	if (h2>h7) k=h2, h2=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;

	if (h1>h7) k=h1, h1=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;

	if (h0>h7) k=h0, h0=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;
	
	std::cout << h9 <<"\n"<< h8 <<"\n"<< h7 <<"\n";
	
	return 0;
	
}

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

const static int MAX = 10000;

int main() {
    int R[MAX]={0};
    int e;

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

    int cnt = 0;
    for (int j = MAX - 1; j >= 0 ; j--){

        if  (cnt >= 3) break;

        if (R[j] != 0){
            cout << R[j] << endl;
            cnt++;
        }
    }
    return 0;
}

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

void swap(int *b, int *c)
{
    int tmp;
    tmp = *b;
    *c = *b;
    *b = tmp;
}

int main(void){

	int a[11],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 = a[1];

	for (int i=2; i<11; i++){
		if (max1 < a[i]){
			swap(max1,a[i]);
		}
	}
	max2 = a[2];

	for (int i=3; i<11; i++){
		if (max2 < a[i]){
			swap(max2,a[i]);
		}
	}
	max3 = a[3];

	for (int i=4; i<11; i++){
		if (max3 < a[i]){
			swap(max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

C++: #include <iostream> //??\????????¨
#include <vector> //???????????±?????¨
#include <algorithm> //???????????¨
using namespace std;

int main(){
	int n;
	vector<int> high; //int????????????high?????£?¨?(????????????????????§????´???°?????????)

	for(int i=0;i<10;i++){
		cin >> n; //??´??°?????\???????????????n???????????????
		high.push_back(n); //push_back:?????°?????????????????????????????????
	}

	sort(high.begin(),high.end()); //begin:?????????????´???????????????¬??????????????????end:?????????????´???????????????¬???????????????

	for(int i=9;i>=7;i--){
			cout << high.at(i) << endl; //at:?????°????????????????´??????????
	}
	return 0;
}

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

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

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

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

int main(){
    int m[10];
    for(int i=0; i<10; i++){
        cin>>m[i];
    }
    
    sort(m , m+10 ,greater<int>());
    
    for(int i=0; i<3; i++){
        cout << m[i] <<endl;
    }
    
    return 0;
}

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

int main()
{
	int x[9], i;
	for (i=1; i<=10; i++)
	{
		cin >> x[i];
		sort(x,x+i);
	}
	
	cout << x[10] << endl;
	cout << x[9] << endl;
	cout << x[8] << 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[2]=a[1];
			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\n",a[0],a[1],a[2]);
	}
	printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
	
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a[10],i,j,tmp;
	for(i=0;i<10;i++){
		scanf("%d",&a[i]);
	}
	for(i=0;i<10;i++){
		for(j=i+1;j<10;j++){
			if(a[i]<a[j]){
				tmp=a[j];
				a[j]=a[i];
				a[i]=tmp;
			}
		}
	}
	printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
	return 0;
}

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

int main()
{
	int m[10];
	for (int i=0; i<10; ++i)
		cin >> m[i];
	sort(m, m+10);
	for (int i=9; i>6; --i)
		cout << m[i] << '\n';
	return 0;
}

C++: #include<bits//stdc++.h>
using namespace std;
int main(){
    vector<int> a(10);
    for(int i = 0; i< 10;i++) cin >> a[i];
    sort(a.rbegin(),a.rend());
    cout << a[0] << endl;
    cout << a[1] << endl;
    cout << a[2] << endl;
}

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>6;i--){
		cout<<a[i]<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

static const int ARRAY_NUM = 10;

class sort{
private:
	int tmp;
public:
	int* bable(int a[]);
};

int* sort::bable(int a[]){
	for(int i=0;i<ARRAY_NUM;++i){
		for(int j=ARRAY_NUM-1;j>i;--j){
			if(a[j]>a[j-1]){
				tmp    = a[j-1];
				a[j-1] = a[j];
				a[j]   = tmp;
			}
		}
	}
	return a;
}

int main(void){

	sort sort;
	int hgt_mt[10];
	int* hgt_max;

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

	hgt_max = sort.bable(hgt_mt);

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

	return 0;
}