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<bits/stdc++.h>
using namespace std;
int main(){
  int m[10];
  for(int i=0;i<10;i++){
    cin>>m[i];
  }
  sort(m,m+10);
  reverse(m,m+10);
  cout<<m[0]<<endl;
  cout<<m[1]<<endl;
  cout<<m[2]<<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<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;
}