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>
#include <queue>
using namespace std;

int main(void) {
    priority_queue<int> que;
    
    
    int num;
    while(scanf("%d", &num) != EOF) {
        que.push(num);
    }
    cout << que.top() << endl; que.pop();
    cout << que.top() << endl; que.pop();
    cout << que.top() << endl; que.pop();
    
    return(0);
}

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

C++: #include <stdio.h>

int main()
{
    int i,height,one = 0,two = 0,three = 0;
    for(i=0;i<10;++i){
        scanf("%d",&height);
        if(one < height){
            three = two;
            two = one;
            one = height;
        }else if(two < height){
            three = two;
            two = height;
        }else if(three <= height){
            three = height;
        }
    }
    printf("%d\n%d\n%d\n",one,two,three);
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7/*998244353*/;
const ll INF = 1LL << 60;
ll mod_pow(ll, ll, ll); ll mod_fact(ll, ll); ll mod_inv(ll, ll); ll gcd(ll, ll); ll lcm(ll, ll);
//
int main(){
    vector<int> v(10);
    for(int i = 0; i <10; i++) cin >> v[i];
    sort(v.begin(), v.end(), greater<int>());
    for(int i = 0; i < 3; i++) cout << v[i] <<"\n";
}

C++: #include<stdio.h>
       
int main(void){
       
    /* 宣言と初期化 */
    int hai[10];
    int id[2]
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
       
for(i=0;i<10;i++)
{
scanf("%d",&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];hai[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<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;

int main() {
	int a;
	vector<int> A;
	for (int i = 0; i < 10; i++) {
		cin >> a;
		A.push_back(a);
	}
	sort(A.begin(), A.end(), greater<int>());
	cout << A[0] << endl;
	cout << A[1] << endl;
	cout << A[2] << endl;
	return 0;
}

C++: #include <cstdio>
#include <vector>
#include <algorithm>
bool sortFunc (int a, int b) {
	return (a > b);
}

int main (int argc, char**argv) { 
	using namespace std;
	int reader;
	vector<int> vec(10, 0);
	for(int i = 0; i < 10; ++i) {
		fscanf(stdin, "%d", &reader);
		vec[i] = reader;
	}
	sort(vec.begin(), vec.end(), sortFunc);
	for (int i=0; i<3; i++) {
		printf("%d\n", vec[i]);
	}
}

C++: 
/*************************************************************************************
                         ---------------------------
                   ------Bismillahir-Rahmanir-Rahim------
                         ---------------------------

                    U         U            M           M
                    U         U            M  M     M  M
                    U         U            M     M     M
                    U         U            M           M
                    U         U            M           M
                    U         U   *        M           M     *
                    U         U  * *       M           M    * *
                      U  U  U     *        M           M     *
    -----------------------------------------------------------------------
            //     //   Name: MD: MEHEDI HASAN              //     //
           //     //    Institute: HSTU                    //     //
          //     //     Dept.: CSE                        //     //
         //     //      Email: mehedi1502032@gmail.com   //     //
    -----------------------------------------------------------------------
            ---------- I Love Programming as Gaming ----------
**************************************************************************************/
#include<algorithm>
#include<iostream>
#include <sstream>
#include<iomanip>
#include<cassert>
#include<cstdlib>
#include<cstring>
#include<utility>
#include<sstream>
#include<cctype>
#include<cstdio>
#include<string>
#include<vector>
#include<limits>
#include<queue>
#include<cmath>
#include<stack>
#include<ctime>
#include<list>
#include<map>
#include<set>

using namespace std;

#define loop(a,b,c) for(int a=b;a<c;a++)
#define lloop(a,b,c) for(long long a=b;a<c;a++)
#define rloop(a,b,c) for(int a=c-1;a>=b;a--)
#define rlloop(a,b,c) for(long long a=c-1;a>=b;a--)
#define EPS 1e-9
#define PI acos(-1)
#define rn PI/180
#define TC(t) scanf("%d",&t);while(t--)
#define sf scanf
#define pf printf
#define SIZE 100001
#define sp ' '
#define nl printf("\n")
#define pb push_back
#define pp pop_back
#define mp make_pair
#define ff first
#define ss second
#define gcd(a,b) __gcd(a,b)
#define b_s(v,x) binary_search(v.begin(),v.end(),x)
#define l_b(v,x) lower_bound(v.begin(),v.end(),x)
#define u_b(v,x) upper_bound(v.begin(),v.end(),x)
#define e_r(v,x) equal_range(v.begin(),v.end(),x)

/// ASCII Vlaue....
/// A=65,Z=90,a=97,z=122,0=48,9=57


const int MOD=1000000007;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> vi;
typedef vector<string> vs;
typedef stack<int> si;
typedef stack<string> ss;
typedef queue<int> qi;
typedef queue<string> qs;
typedef pair<int,int> pii;
typedef pair<string,int>psi;

ll nCr(ll aan, ll aar)
{
    ll ii, aac=1;
    for(ii=1; ii<=aar; ii++)
    {
        aac*=(aan-aar+ii);
        aac/=ii;
    }
    return aac;
}

bool status[1100002];
void siv()
{
	int N=1000000;
	int sq=sqrt(N);
	for(int i=4;i<=N;i+=2) status[i]=1;
	for(int i=3;i<=sq;i+=2){
		if(status[i]==0)
		{
			for(int j=i*i;j<=N;j+=i) status[j]=1;
		}
	}
	status[1]=1;
}

ll big_mod(ll base, ll power, ll mod)
{
    if(power==0) return 1;
    if(power&1)
    {
        ll p1=base%mod;
        ll p2=(big_mod(base, power-1,mod))%mod;
        return (p1*p2)%mod;
    }
    else
    {
        ll p1=(big_mod(base,power/2,mod))%mod;
        return (p1*p1)%mod;
    }
}
ll modInverseBigMod(ll a,ll m)  //a*x=1(mod m)
{
    return big_mod(a,m-2,m);
}

///START YOUR CODE FROM HERE.... Happy Coding.... ! ;)

int main()
{
    int a[11];
    loop(i,0,10) cin>>a[i];
    sort(a,a+10);
    cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl;




    return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
int main(){
	int h;
	std::vector<int> heights;
	for(int i=0; i<10; i++){
		std::cin >> h;
		heights.push_back(h);
	}
	std::sort(heights.begin(), heights.end(), std::greater<int>());
	int i=0;
	for(std::vector<int>::iterator it=heights.begin();
		i<3 && it!=heights.end(); i++, it++){
			std::cout << *it << '\n';
	}
}