Go: package main

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

func main() {
	mountHeightList := make([]int64, 10)
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 10; i++ {
		scanner.Scan()
		mountHeightList[i], _ = strconv.ParseInt(scanner.Text(), 10, 64)
	}

	sort.Slice(mountHeightList, func(i, j int) bool { return mountHeightList[i] > mountHeightList[j] })

	for i := 0; i < 3; i++ {
		fmt.Printf("%d\n", mountHeightList[i])
	}
}

C++: /*
    AOJ Volume0 0001

        List of Top 3 Hills
        There is a data which provides heights (in meter) of mountains. The data is only for ten mountains.
        Write a program which prints heights of the top three mountains in descending order.


        Input
            Height of mountain 1
            Height of mountain 2
            Height of mountain 3
             .
             .
            Height of mountain 10



        Constraints
            0 ≤ height of mountain (integer) ≤ 10,000



        Output
            Height of the 1st mountain
            Height of the 2nd mountain
            Height of the 3rd mountain



        Sample Input 1
            1819
            2003
            876
            2840
            1723
            1673
            3776
            2848
            1592
            922

        Output for the Sample Input 1
            3776
            2848
            2840

        Sample Input 2
            100
            200
            300
            400
            500
            600
            700
            800
            900
            900
    
        Output for the Sample Input 2
            900
            900
            800
    
*/

#include <iostream>


namespace aoj
{
    class bigger_int_storage
    {
    private:
        int _size;
        int* _buffer;

    public:
        bigger_int_storage(int size);
        ~bigger_int_storage();
        void push(int value);
        int operator[](int idx)const;
    };
}



int main(void)
{
    aoj::bigger_int_storage bs(3);

    for(int i=0; i<10; ++i)
    {
        int input;
        std::cin >> input;
        bs.push(input);

        /*

        // confirming : 
        std::cout << std::endl;
        std::cout << "[current] -----" << std::endl;
        std::cout << bs[0] << std::endl;
        std::cout << bs[1] << std::endl;
        std::cout << bs[2] << std::endl;
        */
    }

    std::cout << bs[0] << std::endl;
    std::cout << bs[1] << std::endl;
    std::cout << bs[2] << std::endl;

    return 0;
}




aoj::bigger_int_storage::bigger_int_storage(int size)
{
    _size = size;
    _buffer = new int[_size];
    for(int i=0; i<_size; ++i)
        _buffer[i] = -2147483648;
}

aoj::bigger_int_storage::~bigger_int_storage()
{
    delete[] _buffer;
}

void aoj::bigger_int_storage::push(int value)
{
    for(int i=0; i<_size; ++i)
    {
        if(value > _buffer[i])
        {
            for(int j=_size-1; j>i; --j)
                _buffer[j] = _buffer[j-1];

            _buffer[i] = value;
            break;
        }
    }
}

int aoj::bigger_int_storage::operator[](int idx)const
{
    return _buffer[idx];
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define REP(i,n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i,n) for(int i=n; i>-1; --i)
#define ALL(a) (a).begin(),(a).end()
#define FILL(a,x); REP(i,sizeof(a)){ (a)[i]=(x); }
#define CINA(a,n); REP(i,(n)){ cin >> (a)[i]; }
#define FILL2(a,n,m,x); REP(i,(n)){ REP(j,(m)){(a)[i][j]=(x);} }
#define CINA2(a,n,m); REP(i,(n)){ REP(j,(m)){cin >> (a)[i][j];} }
#define Liny "Yes\n"
#define Linn "No\n"
#define LINY "YES\n"
#define LINN "NO\n"

#define umap unordered_map
//cout << setfill('0') << right << setw(4) << 12; // "0012"
int keta(ll x){ if(x<10){return 1;} else{return keta(x/10) + 1;}}
int keta_wa(ll x){ if(x<10){return x;} else{return keta_wa(x/10) + x%10;} }
int ctoi(char c){ return ( (c>='0' && c<='9')? c - '0': 0 );}
ll sum(ll a[],ll N){ return accumulate(a,a+N,0LL);}
ll gcd(ll a,ll b){if(a<b)swap(a,b); return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){if(a<b){swap(a,b);} return a/gcd(a,b)*b;}

int main(){
  int h[10];
  REP(i,10){ cin>>h[i];}
  sort(h,h+10,greater<int>());
  REP(i,3){ cout << h[i] <<"\n";}
}

C++: 
#include <iostream>
#include <algorithm>
using namespace std;
int main(){
        int a[10],i;
        for(i=0;i<10;i++) cin >> a[i];
        sort(a,a+10,greater<int>());
        for(i=0;i<3;i++) cout << a[i] << endl;
        return 0;
}
~                                                                                                                                                                                    
~                                                                                                                                                                                    
~

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

int main() {
	int a[10];
	for(int i=0;i<10;i++){
		cin >> a[i];
	}
	for(int i=1;i<10;i++)
		for(int j=0;j<i;j++){
			if(a[i]<a[j]){
				swap(a[i],a[j]);
			}
		}
		for(int k=9;k>=7;k--)	
			cout << a[k] << endl;
	
	return 0;
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  while (true) {}
}

C++: #include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;
int main()
{
    int i,j,a[100],temp;
    for(i=0;i<10;i++){
        cin>>a[i];
    }
    for(i=0;i<10;i++){
        for(j=0;j<10-(i+1);j++){
            if(a[j]>a[j+1]){
                temp=a[j];
                a[j]=a[j+1];
                a[j+1]=temp;
            }
        }
    }
    for(j=9;j>=7;j--){
        printf("%d\n",a[j]);
    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
int main() {
  vector<int> a(10);
  int max;
  size_t idx;
  vector<int>::iterator itr;
  
  for(size_t i = 0; i < a.size(); ++i) {
	cin >> a[i];
  }

  for(int i = 0; i < 3; i++) {
	itr = max_element(a.begin(), a.end());
	idx = distance(a.begin(), itr);
	cout << *max_element(a.begin(), a.end()) << endl;
	a[idx] = 0;
  }
  return 0;
}

C++: #include<iostream>
using std::cin;
using std::cout;
using std::endl ;
int main()
{
	int b[10];
	int i=0,j;
	for(;i<10;i++)
		cin>>b[i];
	int t;
	for(i=0;i<3;i++)
	{
		for(j=0;j+i<9;j++)
			while(b[j]>b[j+1])
			{	t=b[j];b[j]=b[j+1];b[j+1]=t;}
		cout<<b[j]<<endl;
	}
	return 0;
}