Go: package main

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

var rdr = bufio.NewReaderSize(os.Stdin, 1000000)

func readLine() string {
	buf := make([]byte, 0, 1000000)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func toInt(str string) int {
	n, _ := strconv.Atoi(str)
	return n
}

func main() {
	lst := make([]int, 0)
	for i := 0; i < 10; i++ {
		lst = append(lst, toInt(readLine()))
	}
	sort.Ints(lst)
	for i := 9; i > 6; i-- {
		fmt.Println(lst[i])
	}
}

C++: #include<iostream>
 using namespace std;
int main(){
int input[10];
int first;
int second;
int third;
for(int i=0;i<10;i++){
cin>>input[i];
}
for(int i=0;i<30;i++){
if(first<input[i]){first = input[i];}
else if(second<input[i-10]){second = input[i-10];}
else if(third<input[i-20]){third = input[i-20];}
}
cout<<first<<endl;
cout<<second<<endl;
cout<<third<<endl;
return 0;

}

C++: #include<iostream>
 using namespace std;
int main(){
	int input[10];
	int first;
	int second;
	int third;
	for(int i;i<10;i++){
		cin>>input[i];
	}
	for(int i;i<10;i++){
	if(input[i]>first){
	first = input[i];
        input[i] = 0;
	}
	}
	for(int i;i<10;i++){
	if(input[i]>second){
	second = input[i];
        input[i] = 0;
	}
	}
	for(int i;i<10;i++){
	if(input[i]>first){
	third = input[i];
	}
	}
	cout<<first<<endl;cout<<second<<endl;cout<<third<<endl;
	return 0;

}

C++: #include <bits/stdc++.h>
#define INF 114514810
#define FOR(i, r, n) for(int i=(r); i<(n); i++) 
#define REP(i, n) FOR(i, 0, n)

using namespace std;

vector<int> v;
int t;

int main(){
	REP(i, 10) {
		cin >> t;
		v.push_back(t);
	}
	sort(v.begin(), v.end());
	cout << v[9] << endl << v[8] << endl << v[7] << endl;
}

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

int main(void){
    int i;
    vector<int> v;
    while(getline(cin, num)){
        v.push_back(num);
    }
    sort(v.begin(), v.end());
    for(int i = 1; i < 4; i++){
        cout << v[v.size - i] << endl;
    }
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int i,j,a[11];
    int m1=0,m2=0,m3=0;
    for(i=0;i<10;i++)
    {
        cin>>a[i];
    }
   sort(a,a+10);

   cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl;
    return 0;
}

C++: /*
C++ ???????????????????????????????????¬??????
??????AOJ-ITP1??????????????????
*/
#define _USE_MATH_DEFINES

#include <iostream> // ?¨??????\??????
#include <fstream>  // ??????????????\??????
#include <string>   // ???????????¢???
#include <vector>   // ???????????????
#include <cmath>    // ??°??????
#include <iomanip>  // stream???????????¢???
#include <algorithm>// max??¢??°??????

using std::cin;
using std::cout;
using std::endl;
using std::string;
using std::vector;        // ????´???°????????????????????????
using std::fixed;         // ???????????????????¨???????????????????????????????
using std::setprecision;  // ?????°????°???°?????\???????????°????????????????????¨????????\???

int main() {
	vector<int> height;	// ??\???????????????????´?????????????
	int h;				// ??\?????????????????????????´??????°

	// 10????????\?????????????????????
	for (size_t i = 0; i < 10; i++)
	{
		cin >> h;
		height.push_back(h);
	}
	// ????????????
	std::sort(height.begin(), height.end());

	// ??????
	cout << height[9] << endl;
	cout << height[8] << endl;
	cout << height[7] << endl;
	return 0;
}

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

int main() {
  std::vector<int> heights;
  for (auto i =0; i < 10; i++) {
    int h;
    std::cin >> h;
    heights.push_back(h);
  }
  std::sort(heights.begin(), heights.end(), std::greater<int>());
  for (auto i =0; i < 3; i++) {
    std::cout << heights[i] << '\n';
  }
  return 0;
}

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>
#include<climits>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long UInt64;
typedef long long Int64;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

template<class _RanIt,class _Diff,class _Tmp> inline void _insertion_sort (_RanIt _Array,_Diff _Count,_Tmp)
{
	_Tmp tmp;
	for(_Diff i = 1; i < _Count; i++)
	{
		tmp = *(_Array + i);
		if( *(_Array + i - 1) > tmp)
		{
			_Diff j = i;
			do
			{
				*(_Array + j) = *(_Array + j - 1);
				j--;
			}while(j > 0 && *(_Array + j - 1) > tmp);
			*(_Array + j) = tmp;
		}
	}

}

template<class _RanIt,class _Diff,class _Tmp,class _Pr> inline void _insertion_sort (_RanIt _Array,_Diff _Count,_Tmp,_Pr _Pred)
{
	_Tmp tmp;
	for(_Diff i = 1; i < _Count; i++)
	{
		tmp = *(_Array + i);
		if( _Pred(*(_Array + i - 1) , tmp))
		{
			_Diff j = i;
			do
			{
				*(_Array + j) = *(_Array + j - 1);
				j--;
			}while(j > 0 && _Pred(*(_Array + j - 1) , tmp));
			*(_Array + j) = tmp;
		}
	}

}
	
template<class _RanIt> inline void insertion_sort(_RanIt _First,_RanIt _Last)
{
	_insertion_sort(_First,_Last - _First,*(_First));

}

template<class _RanIt,class _Pr> inline void insertion_sort(_RanIt _First,_RanIt _Last,_Pr _Pred)
{
	_insertion_sort(_First,_Last - _First,*(_First),_Pred);

}


//bubble_sort
template<class T> inline void myswap(T& a,T& b)
{
	T tmp;
	tmp = a;
	a = b;
	b = tmp;
}


template<class _RanIt,class _Diff> inline	void _bubble_sort (_RanIt _Array,_Diff _Count)
{
	for(_Diff i = 0; i < _Count; i++)
	{
		for(_Diff j = _Count - 1; j > i; j--)
		{
			if(_Array[j] < _Array[j-1])
			{
				myswap(_Array[j],_Array[j-1]);
			}

		}
	}	
}

template<class _RanIt,class _Diff,class _Pr> inline void _bubble_sort (_RanIt _Array,_Diff _Count,_Pr Pred)
{
	for(_Diff i = 0; i < _Count; i++)
	{
		for(_Diff j = _Count - 1; j > i; j--)
		{
			if(Pred(_Array[j] , _Array[j-1]))
			{
				myswap(_Array[j],_Array[j-1]);
			}

		}
	}	

}

template<class _RanIt> inline	void bubble_sort(_RanIt _First,_RanIt _Last)
{
	_bubble_sort(_First,_Last - _First);
}

template<class _RanIt,class _Pr> inline	void bubble_sort (_RanIt _First,_RanIt _Last, _Pr _Pred)
{
	_bubble_sort(_First,_Last - _First,_Pred);
}
	
int main()
{
	
	int a[10];
	rep(i,10) cin>>a[i];

	insertion_sort(a,a+10);


	cout<<a[9]<<endl;
	cout<<a[8]<<endl;
	cout<<a[7]<<endl;

	return 0;
}

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

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

  for( i = 0; i < 10; i++ ){
    for ( int j = 0;j < 9; j++ ){
      if ( data[j] < data[j+1]) swap(data[j],data[j+1]);
    }
  }

  for( i = 0; i < 3; i++ ) cout << data[i] << endl;
  return 0;
}

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

using namespace std;
typedef long long ll;

int main(){
    
    ios_base::sync_with_stdio(0);
    int a[10];
    for(int i=0;i<10;i++)   cin>>a[i];
    sort(a,a+10);
    cout<<a[9]<<endl;
    cout<<a[8]<<endl;
    cout<<a[7]<<endl;
    return 0;
}

C++: //
// Created by tac on 2016/10/27.
//

#include <cstdlib>
#include <functional>
#include <vector>
#include <iostream>

const int N_SIZE = 10000;

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