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 <istream>
#include <fstream>
#define SIZE 10
#define TOPNUM 3
using namespace std;

int main(){
	ifstream ifs("data.txt");
	if( !ifs ) return 1;
	int height[SIZE],top[TOPNUM+1]={0};
	for( int i=0;i<SIZE;i++ ){
		ifs>>height[i];
		if( height[i]<0||10000<height[i] )
			return 1;
		for( int j=0;j<TOPNUM;j++ ){
			if( height[i]>top[j] ){
				for( int k=TOPNUM;k>j;k-- ){
					top[k]=top[k-1];
				}
				top[j]=height[i];
				break;
			}
		}
	}
	for( int i=0;i<TOPNUM;i++ ){
		cout<<top[i]<<endl;
	}
}

C++: #include <iostream>

using namespace std;

void reverse(int *array, int length) {
	int i;
	int j;
	for(i=0;i<length-1;i++){
		for(j=i+1;j<length;j++){
			if(array[i]<array[j]){
				int temp=array[i];
				array[i]=array[j];
				array[j]=temp;
			}
		}
	}
}

int main() {
	int mountain[10];
	for (int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}
	reverse(mountain, 10);
	for (int i = 0; i < 3; i++) {
		cout << mountain[i] << endl;
	}
}

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

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

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

int first = 0, second = 0, third = 0;

//for sort
void sort(){
	int buf = third;
	if(third > first){
	//3rd > 1st ,1->2 2->3 3->1
		third = second;
		second = first;
		first = buf;
	}else if(third > second){
	//3rd > 2nd ,2->3 3->2
		third = second;
		second = buf;
	}
}

int main(){
int buf;

for(int i = 0; i < 10; i++){
	cin >> buf;
	if(buf > third){
		third = buf;
		sort();
	}
}

//show
cout << first << "\n";
cout << second << "\n";
cout << third << "\n";

return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
	int T,t3,t2,t1;
	for(int i=0;i<10;i++){
		cin>>T;
		if(T>=t1){
			t1=T;
			t2=t1;
			t3=t2;
		}
		else if(T>=t2){
			t2=T;
			t3=t2;
		}
		else if(T>=t3){
			t3=T;
		}
	}
	cout<<t1<<endl<<t2<<endl<<t3;
	return 0;
}

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

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

C++: #include <cstdio>
#include <algorithm>

using namespace std;

const int N = 10;
int a[N];

int main() {
  for(int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a+N);
  for(int i = 0; i < 3; i++) printf("%d/n", a[i]);
}

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

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

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

int main(void) {
	int a[10] = { 0 };
	for (int i = 0; i < 10; i++) {
		cin >> a[i];
	}
	for (int j = 0; j < 3; j++) {
		int max = 0, label = 0;
		for (int i = 0; i < 10; i++) {
			if (a[i] > max) {
				max = a[i];
				label = i;
			}
		}
		cout << max << endl;
		a[label] = 0;
	}
	return 0;
}

C++: #include <iostream>


void Sort(int* a){
int tmp;
for(int i=0;i<10;i++){
for(int j=0;j<9;j++){
if(a[j]<a[j+1]){
tmp = a[j+1];
a[j+1]=a[j];
a[j] = tmp;
}
}
}
}



int main(){

int a[10];

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

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


}

C++: #include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <valarray>
#include <iterator>
using namespace std;
typedef long long int ll;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;

#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++)
#define ALL(container) container.begin(), container.end()
#define RALL(container) container.rbegin(), container.rend()
#define SZ(container) ((int)container.size())
#define mp(a,b) make_pair(a, b)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<class T> ostream& operator<<(ostream &os, const vector<T> &t) {
os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os;
}
template<class T> ostream& operator<<(ostream &os, const set<T> &t) {
os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os;
}
template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";}

const int INF = 1<<28;
const double EPS = 1e-8;
const int MOD = 1000000007;


int n;
int a[10];
main(){
	REP(i, 10) cin >> a[i];
	sort(a, a+10);
	printf("%d\n%d\n%d\n", a[9], a[8], a[7]);
	return 0;
}

C++: #include<stdio.h>

const int N=105;

int main(void)
{
     int a[N]={0};
     
     for(int i = 0 ; i < 10 ;i++)
     {
     	scanf("%d",&a[i]);
	 }
	 
	 for(int i = 0 ; i<10 ; i++)
	 {
	 	for(int j = i ; j<10 ;j++)
	 	{
	 		if(a[i]<a[j])
	 		{
	 			int tmp=a[i];
	 			a[i]=a[j];
	 			a[j]=tmp;
			 }
	 		
	 		
	 		
		 }
	 }
	 
	 for(int i=0 ; i<3 ;i++)
	 {
	 	printf("%d\n",a[i]);
	 }
	
	
	
}

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

using namespace std;

int main(int argc, const char * argv[])
{
    int height[10];
    for (int i=0; i<10; i++) {
        cin >> height[i];
    }
    sort(height, height+10, greater<int>());
    
    for (int i=0; i<3; i++) {
        cout << height[i] << endl;
    }
    
    return 0;
}

C++: #include <iostream>
#include <string>
#include <stringstream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstdlib>
using namespace std;

#define REP(i,n) for(int i=0;i<n;++i)
#define rep(n) REP(i,n)
int hills[16];

int main()
{
	rep(10) cin>>hills[i];

	sort( hills, hills+10, greater<int>() );

	rep(3) cout<<hills[i]<<endl;

	return 0;
}

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

int hills[10] ;
int tops[3] = {0,0,0} ;

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

		if( hills[i] >= tops[0] )
		{
			tops[2] = tops[1] ;
			tops[1] = tops[0] ;
			tops[0] = hills[i] ;
		}
		else if( hills[i] >= tops[1] )
		{
			tops[2] = tops[1] ;
			tops[1] = hills[i] ;
		}
		else if( hills[i] >= tops[2] )
		{
			tops[2] = hills[i] ;
		}
	}

	for( int i = 0 ; i < 3 ; i ++ )
	{
		cout << tops[i] << "\n" ;
	}

	return 0 ;
}

C++: #include <iostream>
#include <queue>
#include <vector>
using namespace std;
 
int main()
{
    priority_queue< int,vector<int>,less<int> > que;
    int in;
 
    for(int i = 0; i < 10; i++){
        cin >> in;
        que.push(in);
    }
 
 
    for(int j = 0; j < 3; j++){
        cout << que.top() << '\n';
        que.pop();
    }
 
    return 0;
}