Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	heighs := make([]int, 10)
	for i := range heighs {
		heighs[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(heighs)))
	for i := 0; i < 3; i++ {
		fmt.Println(heighs[i])
	}
}

C++: #include<stdio.h>

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

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

C++: #include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <unordered_map>

using namespace std;

int main(){
	int m;
	int max[3] = {0};
	for(int i = 0; i < 10; i++){
		cin >> m;
		if(m > max[0]){
			max[2] = max[1];
			max[1] = max[0];
			max[0] = m;
		}else if(m > max[1]){
			max[2] = max[1];
			max[1] = m;
		}else if(m > max[2]){
			max[2] = m;
		}
	}
	
	cout << max[0] << endl;
	cout << max[1] << endl;
	cout << max[2] << endl;
	
    return 0;
}

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

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

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

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

  for(int i = 0 ; i < 10 ; i++)
    {
      for(int j = i + 1 ; j < 10 ; j++)
	{
	  if(height[i] < height[j])
	    {
	      int dumy = height[i];
	      height[i] = height[j];
	      height[j] = dumy;
	    }
	}
    }
  for(int i = 0 ; i < 3 ; i++)
    {
      cout << height[i] << endl;
    }
  return 0;
}

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;
}