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>
using namespace std;
int main() {
int top[5]={0,0,0,0,0};
int yama;

cin >> top[0];

for(int i=0; i<9; i++){
 cin >> yama;

 for(int j=0; j<3; j++){
  if(yama >top[j]){
   top[j+2] = top[j+1]
   top[j+1] = top[j]
   top[j] =yama;
   break;
  }
 }
 return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>

using namespace std;

int main()
{
	int m[10];

	for(int i=0;i<10;i++) cin>>m[i];

	for(int i=0;i<3;i++){
		int max=0;
		for(int j=1;j<10;j++){
			if(m[j]>m[max]) max=j;
		}
		cout<<m[max]<<endl;
		m[max]=0; max=0;
		
	}

	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);
  cout << m[9] << endl << m[8] << endl << m[7] << endl;
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
using namespace std;
inline int toInt(string s) { int v; istringstream sin(s); sin >> v; return v;}
template<class T> inline string toString(T x) { ostringstream sout; sout << x; return sout.str();}
typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,(n)-1)
const double EPS = 1e-12;
const double PI = acos(-1.0);

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

	return 0;
}

C++: #include <iostream>
#include <stdlib.h>

using namespace std;

int main() {
	const int len = 10;
	int arr[len];

	for (int i = 0; i < len; i++)
		cin >> arr[i];

	for (int i = 0; i < len; i++)
		for (int j = 0; j < len; j++)
			if (arr[i] < arr[j])
				swap(arr[i], arr[j]);

	for (int i = len - 1; len - 4 < i; i--)
		cout << arr[i] << endl;

	return 0;
}

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

int main()
{
    int num=10;
    int test[num];
    
    for(int i=0; i<10; i++)
    {
        cin>>test[i];
    }
    for(int s=0; s<9; s++)
    {
        for (int t=s+1; t<10; t++)
        {
            if(test[s]<test[t])
            {
                int a=test[t];
                test[t]=test[s];
                test[s]=a;
            }
        }
    }
   
        cout<< test[0] <<endl<< test[1] <<endl<< test[2]<<endl;
    
    return 0;
}

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

int main() {
    std::vector<int> hills;
    
    int n;
    while (std::cin >> n) {
        hills.push_back(n);
    }
    
    std::sort(hills.begin(), hills.end(), std::greater<int>());
    
    for (int i = 0; i < 3; ++i) {
        std::cout << hills[i] << std::endl;
    }
    
    return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
	const int N=10;
	int height[N];
	for(int i=0;i<10;i++){
		scanf("%d",&height[i]);
	}
	sort(height,height+N);
	reverse(height,height+N);
	for(int j=0;j<3;j++){
		printf("%d",height[j]);
	}
	return 0;
}

C++: #include <iostream>
#include <array>
#include <algorithm>
  
int main(){
    std::array<u_int, 10> heights;
     
    for (u_int i = 0; i < 10; ++i){
        std::cin >> heights[i];
    }
     
    std::sort(heights.begin(), heights.end(), std::greater<u_int>());
     
    for (u_int i = 0; i < 3; ++i){
        std::cout << heights[i] << std::endl;
    }
	
    return 0;
}

C++: #include "iostream"
using namespace std;
int main(int argc, char const *argv[])
{
	int mtain[10];

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

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

			if(mtain[i] < mtain[j]){
				work = mtain[i];
				mtain[i] = mtain[j];
				mtain[j] = work;
				cout << "mtain[" << i << "] = " << mtain[i] << endl;
				cout << "mtain[" << j << "] = " << mtain[j] << endl;
			} 
		}
	}

	cout << mtain[0] << endl;
	cout << mtain[1] << endl;
	cout << mtain[2] << endl;

	return 0;
}

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

using namespace std;

int main() {
    priority_queue<int> pq;

    for (int i = 0; i < 10; ++i) {
        int height;
        cin >> height;
        pq.emplace(height);
    }


    for (int i = 0; i <= 2; ++i) {
        std::cout << pq.top() << endl;
        pq.pop();
    }

    return 0;
}

C++: #include <stdio.h>

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

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

using namespace std;

int cmp(int* a, int* b)
{
	return (*a < *b) ? 1 : ((*a > *b) ? -1 : 0);
}

int main()
{
	int dat[10];

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

	qsort(dat, 10, sizeof(int), reinterpret_cast<int(*) (const void*, const void*)>(cmp));

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

	return 0;
}

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

using namespace std;

int fir[3] = {0, 0, 0};

int* recal(int* arr, int newval){
    for(int i = 0; i < 3; i++){
        if(arr[i] <= newval){
            swap(arr[i], newval);
        }
    }
    return arr;
}

int main(){
    for(int i = 0; i < 10; i++){
        int t;
        cin >> t;
        recal(fir, t);
    }
    for(int i = 0; i <3; i++){
        cout << fir[i] << endl;
    }
    return 0;
}

C++: #include <stdio.h>

int num[13] ;
int ans[3] ;

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

C++: /*
　　　　 ∧＿∧　にっぽんちゃちゃちゃ
　／＼（　・∀・）／ヽ
（ ●　と　　　つ　● ）　にっぽんちゃちゃちゃ
　＼/⊂、 ノ　　＼ノ
　　　　　し'
*/
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define repone(i,n) for(int i=1;i<(int)(n);++i)
#define repo(i,o,n) for(int i=o;i<(int)(n);++i)
#define Rep(j,n) for(int j=0;j<(int)(n);++j)
#define Repone(j,n) for(int j=1;j<(int)(n);++j)
#define all(v) (v).begin(),(v).end()
#define rall(v) (v).rbegin(),(v).rend()
#define int long long
#define MOD 1000000007
#define INF 9223372036854775807


signed main()
{
  string xyz ="";
int x=0,y=0,z=0,w=0,i=0,j=0,n=0;
std::vector<int> v;
rep(i,10){
std::cin >> x;
v.push_back(x);
  }
  sort(rall(v));
rep(i,3){
  std::cout << v[i] << '\n';
}
}