Go: package main

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

var rdr = bufio.NewReaderSize(os.Stdin, 1000000)

func readLine() string {
	buf := make([]byte, 0, 1000000)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func toInt(str string) int {
	n, _ := strconv.Atoi(str)
	return n
}

func main() {
	lst := make([]int, 0)
	for i := 0; i < 10; i++ {
		lst = append(lst, toInt(readLine()))
	}
	sort.Ints(lst)
	for i := 9; i > 6; i-- {
		fmt.Println(lst[i])
	}
}

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

int main() {
  int height[10];
  for (int i = 0; i < 10; ++i) {
    cin >> height[i];
  }
  int maxHight[3] = {0, 0, 0};
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < 3; ++j) {
      if (maxHight[j] < height[i]) {
	for (int k = 2; k > j; --k) { // 入れ替える
	  maxHight[k] = maxHight[k-1];
	}
	maxHight[j] = height[i];
	break;
      }
    }
  }
  for (int i = 0; i < 3; ++i) {
    cout << maxHight[i] << endl;
  }
}

C++: #include <iostream>
#include <complex>
#include <sstream>
#include <string>
#include <algorithm>
#include <deque>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
#include <set>
#include <limits>
#include <cstdio>
#include <cctype>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
#define REP(i, j) for(int i = 0; i < (int)(j); ++i)
#define FOR(i, j, k) for(int i = (int)(j); i < (int)(k); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define REVERSE(v) reverse((v).begin(), (v).end())
typedef complex<double> P;
const int N = 10;

int main() {
  vector<int> ms(N);
  REP(i, N) scanf("%d", &ms[i]);
  SORT(ms);
  printf("%d\n%d\n%d\n", ms[N - 1], ms[N - 2], ms[N - 3]);
  return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;          
int main(void){
    /* 宣言と初期化 */
    int hai[10];
    int id[2];
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
            
for(i=0;i<10;i++)
{
   cin >> hai[i];
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0];
    /* 計算 */
    for(i=0;i<10;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
       {tempmax=hai[i];id[0]=i;}
    }
    for(i=0;i<10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd&& i != id[0])
        {temp2nd=hai[i];id[1]=i;}
    }
    for(i=0;i<10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd && i != id[1] && i != id[0])
       {temp3rd=hai[i];}
    }
            
    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);
            
    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>
#include<queue>
using namespace std;

int main()
{
priority_queue<int> que;
for(int i=0;i<10;i++)
{
int t;
cin>>t;
que.push_pack(t);
}
for(int i=0;i<3;i++)
{
cout<<que.top()<<endl;
que.pop();
}
return 0;
}

C++: #include<iostream>

#include<algorithm>
 
int main()
{
    int height(10);
 
    for(int i=0;i<10;++i)
    {
        std::cin >> height[i];
    }
 
    std::sort(height.begin(),height.end());
 
    std::cout << height[9] << '\n';
 
    std::cout << height[8] << '\n';
 
    std::cout << height[7] << '\n';
}

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

int main(){
	int i[10];
	for(int j=0;j<=9;j++){
		cin >> i[j];
	}
	int h[3] ={0,0,0};
	for(int j =0;j<=9;j++){
		if(h[0]<=i[j]){
			h[2]=h[1];
			h[1]=h[0];
			h[0]=i[j];
		}
		else if(h[1]<=i[j]){
			h[2]=h[1];
			h[1]=i[j];
		}
		else if(h[2]<=i[j]){
			h[2]=i[j];
		}
	}
	cout<<h[0]<<"\n";
	cout<<h[1]<<"\n";
	cout<<h[2]<<"\n";
	return 0;

}

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

int main(){
    int hest[3]={0,0,0};
    int h;
    for(int i=0;i<10;i++){
        std::cin>>h;
        for(int j=0;j<3;j++){
            if(hest[j]<h){
                hest[j] = h;
                break;
            }
        }
    }

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

    return 0;
}

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,greater<int>());
    for(int i=0;i<3;i++){
        cout << a[i] << endl;
    }
    return 0;
}

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

int main(){

	int a[100];
	int list[4]={0,0,0,0};


	for(int i=1;i<10;i++){

		cin>>a[i];

		if(list[1]<a[i]){
			list[3]=list[2];
			list[2]=list[1];
			list[1]=a[i];
		}

		else if(list[2]<a[i]){
			list[3]=list[2];
			list[2]=a[i];
		}

		else if(list[3]<a[i]){
			list[3]=a[i];
		}

	}
	
	for(int j=1;j<=3;j++){
			cout<<list[j]<<endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(int argc, const char * argv[]) {
    int mountain[10] = {0};
    int i, k, index;
    int height = 0;
    for (i = 0; i < 10; i++) {
        cin >> mountain[i];
    }
    for (i = 0; i < 3; i++) {
        height = 0;
        for (k = 0; k < 10; k++) {
            if (height < mountain[k]) {
                height = mountain[k];
                index = k;
            }
        }
        cout << height <<endl;
        mountain[index] = 0;
    }
    return 0;
}

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

int main()
{
	int top[3];
	memset(top, 0, sizeof(top));
	int h;
	while (scanf("%d", &h) != EOF)
	{
		for (int i = 0; i < 3; ++i)
		{
			if (top[i] < h)
			{
				for (int j = 2; j > i; --j)
					top[j] = top[j-1];
				top[i] = h;
				break;
			}
		}
	}
	for (int i = 0; i < 3; ++i)
		printf("%d\n", top[i]);

	return 0;
}

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

using namespace std;

#define LOG(...) fprintf(stderr, __VA_ARGS__)
//#define LOG(...)
#define FOR(i, a, b) for(int i=(int)(a); i<(int)(b); ++i)
#define REP(i, n) for(int i=0; i<(int)(n); ++i)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define EXIST(s, e) ((s).find(e)!=(s).end())
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(RALL(c))
#define SQ(n) (n) * (n)

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

int main() {
  vi mt(10);
  REP(i, 10) cin >> mt[i];
  RSORT(mt);
  REP(i, 3) cout << mt[i] << endl;
}

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

int main(){
	std::vector<int> height;
	for (int i = 0; i < 10; i++)
	{
		int scan_num;
		std::cin >> scan_num;
		height.push_back(scan_num);
	}
	std::sort(height.begin(), height.end());
	for (int i = 10; i > 10 - 3; i--)
	{
		std::cout << height[i-1] << '\n';
	}
	return 0;

}

C++: #include <iostream>
using namespace std;
int main(){
	int h[10],one=0,two=0,three=0;
	for(int i=0;i<10;i++){
		cin>>h[i];
		if(three<h[i]){
			if(two<h[i]){
				if(one<h[i]){
					two=one;
					one=h[i];
				}else{
					three=two;
					two=h[i];
				}
			}else{
				three=h[i];
			}
		}
	}
	cout<<one<<endl<<two<<endl<<three<<endl;
	return 0;
}

C++: #include <cstdio> #include <algorithm> using namespace std; int main(void){ int a[10]; int i; for(i=0;i<10;i++){ scanf("%d",&(a[i])); } sort(a,a+10); for(i=9;i>6;i--){ printf("%d\n",a[i]); } return 0; }