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++: #include<iostream>
#include<algorithm>

using namespace std;

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

C++: #include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <math.h>
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <set>
using namespace std;

typedef long long LL;
#define CY 505
#define NODE 1005

int ar[CY][CY], f[CY], r[CY];
int N, idx;

void input(int n) {
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			scanf("%d", &ar[i][j]);
		}
	}
}

void init_set(int n) {
	for (int i = 0; i < n; ++i) {
		f[i] = i;
		r[i] = 0;
	}
}

int find_set(int u) {
	if (u != f[u])
		f[u] = find_set(f[u]);
	return f[u];
}

void union_set(int u, int v) {
	if (r[u] >= r[v]) {
		if (r[u] == r[v])
			r[u]++;
		f[v] = u;
	} else {
		f[u] = v;
	}
}

void solve(int n) {
	idx = 0;
	for (int k = 0; k < 31; ++k) {
		int p = 1 << k;
		init_set(2 * n);
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < n; ++j) {
				if (i == j)
					continue;
				int num = p & ar[i][j];
				if ((i & 1) && (j & 1)) {
					if (num) {
						int u = find_set(f[i]);
						int v = find_set(f[j * 2]);
						if (u != v) {
							union_set(u, v);
						}
						int u = find_set(f[i * 2]);
						int v = find_set(f[j]);
						if (u != v) {
							union_set(u, v);
						}
					} else {
						int u = find_set(f[i]);
						int v = find_set(f[j]);
						if (u != v) {
							union_set(u, v);
						}
					}
				} else if ((i & 1) == 0 && (j & 1) == 0) {
					if (num) {
						int u = find_set(f[i * 2]);
						int v = find_set(f[j * 2]);
						if (u != v) {
							union_set(u, v);
						}
					} else {
						int u = find_set(f[i * 2]);
						int v = find_set(f[j]);
						if (u != v) {
							union_set(u, v);
						}
						int u = find_set(f[i]);
						int v = find_set(f[j * 2]);
						if (u != v) {
							union_set(u, v);
						}
					}
				} else {
					if (num) {
						int u = find_set(f[i * 2]);
						int v = find_set(f[j]);
						if (u != v) {
							union_set(u, v);
						}
						int u = find_set(f[i]);
						int v = find_set(f[j * 2]);
						if (u != v) {
							union_set(u, v);
						}
					} else {
						int u = find_set(f[i]);
						int v = find_set(f[j]);
						if (u != v) {
							union_set(u, v);
						}
						int u = find_set(f[i * 2]);
						int v = find_set(f[j * 2]);
						if (u != v) {
							union_set(u, v);
						}
					}
				}
			}
		}
		sort(e, e + idx, cmp);
	}
}

int main(void) {
	while (~scanf("%d", &N)) {
		input(N);
		solve(N);
	}
	return 0;
}

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

using namespace std;

int main(){
  unsigned tmp;
  vector<unsigned> height;
  for ( unsigned i = 0; i < 10; i++ )
    {
      cin >> tmp;
      height.push_back( tmp );
    }
  sort( height.begin(), height.end(), greater<unsigned>() );
  for ( unsigned i = 0; i < 3; i++ )
    {
      cout << height[ i ] << endl;
    }
  return 0;
}

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

using namespace std;

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

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

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> veci;
typedef vector<ll> vecll;
typedef vector<string> vecs;
template<class T,class U> using Hash=unordered_map<T,U>;

#define REP(i, a, n) for(ll i = a; i < (ll)n; i++)
#define RREP(i, a, n) for(ll i = n-1; i >= (ll)a; i--)
#define rep(i, n) REP(i, 0, n)
#define rrep(i, n) RREP(i, 0, n)
#define MD 1000000007

template<class T> T read(){T a;cin >> a;return a;}
template<class T> void read(T& a){cin >> a;}
template<class T, class ...Args> void read(T& a, Args&... args){cin >> a; read(args...);} 
template<class T> void rarr(T a, int n){for(int i = 0; i < n; i++) {cin >> a[i];}}
template<char c = ' ',class T> void write(T a){cout << setprecision(12) << a << endl;}
template<char c = ' ',class T,class ...Args> void write(T a, Args... args){cout << setprecision(12) << a << c; write<c>(args...);}
template<class T> void warr(vector<T> a, const char* c = " "){cout << a[0];for(int i = 1; i < (int)a.size(); i++)cout << c << a[i];cout << endl;;}
template<class T> void warr(T a, int n, const char* c = " "){cout << a[0];for(int i = 1; i < n; i++)cout << c << a[i];cout << endl;}
void split(string s, string delim, veci& result){result.clear();string::size_type pos = 0;while(pos != string::npos){string::size_type p = s.find(delim, pos);if(p == string::npos){result.push_back(atoi(s.substr(pos).data()));break;}else {result.push_back(atoi(s.substr(pos, p - pos).data()));}pos = p + delim.size();}}
void split(string s, string delim, vecs& result){result.clear();string::size_type pos = 0;while(pos != string::npos){string::size_type p = s.find(delim, pos);if(p == string::npos){result.push_back(s.substr(pos));break;}else {result.push_back(s.substr(pos, p - pos));}pos = p + delim.size();}}
ll gcd(ll a, ll b){while(true){ll k = a % b;if(k == 0)return b;a = b;b = k;}}
ll comb(ll n, ll m){ll p=1;m=min(m,n-m);for(ll i=1;i<=m;i++){p*=n-i+1;p/=i;}return p;}

int main(void)
{
    int a[20];
    rep(i,10)read(a[i]);
    sort(a,a+10);
    rep(i,3)write(a[9-i]);
    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<stdio.h>
int main(void){
  int h[10],i=0,j=0,max,t;
  do{
    scanf("%d",&h[i]);
      i++;
      }while(i<10);
  for(i=0;i<3;i++){
    max=0;
    for(j=i;j<10;j++){
      if(max<h[j]){
	max=h[j];
	t=j;
      }
    }
    h[t]=h[i];
    h[i]=max;

    printf("%d\n",h[i]);
  }
  return 0;
  }

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
int i,j,arr[10],n;
scanf("%d",&n);

for(i=1;i<=10;i++)
{
for(j=0;j<3;j++)
scanf("%d",&arr[j]);
sort(arr,arr+3);
printf("%d\n",arr[j]);
}
return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int high[3]={0};
	int mount;
	for(int i=1;i<=10;i++){
		cin>>mount;
		if(mount>high[0]){high[2]=high[1];high[1]=high[0];high[0]=mount;}
		else if(mount>high[1]){high[2]=high[1];high[1]=mount;}
		else if(mount>high[2]){high[2]=mount;}
	}
	cout<<high[0]<<endl<<high[1]<<endl<<high[2]<<endl;
}

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

using namespace std;
priority_queue<int> Q;

int H;
int main(){
  for(int i= 0;i < 10;i++){
     scanf("%d",&H);
     Q.push(H);
  }
  for(int i= 0;i < 3;i++){
    cout << Q.top() <<endl;
  Q.pop();
  }
  return 0;
}

C++: #include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;
 /*temp*/

int main(){
    int a[10];
    REP1(i,10){
        cin >> a[i];
    }
    sort(a, a+10);
    cout << a[9] << '\n'
         << a[8] << '\n'
         << a[7] << '\n';
}