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 a,b,c,d,e,f,g,h,i,j;
	cin>>a;
	cin>>b;
	cin>>c;
	cin>>d;
	cin>>e;
	cin>>f;
	cin>>g;
	cin>>h;
	cin>>i;
	cin>>j;

	if(a<b){swap(a,b);}
	if(b<c){swap(b,c);}
	if(c<d){swap(c,d);}
	if(d<e){swap(d,e);}
	if(e<f){swap(e,f);}
	if(f<g){swap(f,g);}
	if(g<h){swap(g,h);}
	if(h<i){swap(h,i);}
	if(i<j){swap(i,j);}

	if(a<b){swap(a,b);}
	if(b<c){swap(b,c);}
	if(c<d){swap(c,d);}
	if(d<e){swap(d,e);}
	if(e<f){swap(e,f);}
	if(f<g){swap(f,g);}
	if(g<h){swap(g,h);}
	if(h<i){swap(h,i);}

	if(a<b){swap(a,b);}
	if(b<c){swap(b,c);}
	if(c<d){swap(c,d);}
	if(d<e){swap(d,e);}
	if(e<f){swap(e,f);}
	if(f<g){swap(f,g);}
	if(g<h){swap(g,h);}

	if(a<b){swap(a,b);}
	if(b<c){swap(b,c);}
	if(c<d){swap(c,d);}
	if(d<e){swap(d,e);}
	if(e<f){swap(e,f);}
	if(f<g){swap(f,g);}

	if(a<b){swap(a,b);}
	if(b<c){swap(b,c);}
	if(c<d){swap(c,d);}
	if(d<e){swap(d,e);}
	if(e<f){swap(e,f);}

	if(a<b){swap(a,b);}
	if(b<c){swap(b,c);}
	if(c<d){swap(c,d);}
	if(d<e){swap(d,e);}
	
	if(a<b){swap(a,b);}
	if(b<c){swap(b,c);}
	if(c<d){swap(c,d);}

	if(a<b){swap(a,b);}
	if(b<c){swap(b,c);}

	if(a<b){swap(a,b);}

	cout<<a<<endl;
	cout<<b<<endl;
	cout<<c<<endl;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
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);
    for(int i=0;i<3;i++)cout<<m[i]<<endl;

    return 0;

}

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

int main() {
	int a = 0, b = 0, c = 0, h[10], i = 0;
	for(int i = 0; i < 9; ++i){
		cin >> h[i];
		if(a < h[i]){
			c = b;
			b = a;
			a = h[i];
		}
		else if(b < h[i]){
		    c = b;
		    b = h[i];
		}
		else if(c < h[i]){
			c = h[i];
		}
          ++i;
	}
	cout << a << endl << b << endl << c << endl;
	return 0;
}

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int data[10];
  for(int i=0;i<10;i++){
    cin >>data[i];}
  sort(data,data+10);
  for(int i=9;i>6;i--){
    cout <<data[i]<<endl;}
  return 0;
}

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

int main() {
	const int N = 10;
	int data[N];
	int tmp;

	for (int i = 0;i<N;i++) cin >> data[i];
	for (int i = 1;i <= 3;i++) {
		for (int j = 0;j<N - i;j++) {
			if (data[j]>data[j + 1]) {
				tmp = data[j];
				data[j] = data[j + 1];
				data[j + 1] = tmp;
			}
		}
	}
	cout << data[N - 1] << endl << data[N - 2] << endl << data[N - 3] << endl;

	return 0;
}

C++: main(int a,int*b){
	for(a=0;a<3;++a)b[a]=0;
	for(;~scanf("%d",&b[3]);)
		for(a=4;--a;b[a]<b[a-1]?:(b[a-1]^=b[a]^=b[a-1]^=b[a]));
	for(a=0;a<3;++a)printf("%d\n",b[a]);
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <string.h>
#include <math.h>
#include <stack>
#include <queue>
#include <sstream>
#define inf 1<<30
#define qu queue <int>
#define vc vector <int>
#define pii pair<int,int>
#define mci map <string,int>
#define at  for(int f=1;f<=10;f++)
#define mm(o) memset(o,0,sizeof(o))
#define op freopen("in.txt","r",stdin)
#define op1 freopen("out.txt","w",stdout)

using namespace std;

int main()
{
    
    int a[10];
    at
    {
      scanf("%d",&a[f]);

    }
    sort(a,a+10);
    cout<<a[9]<<endl;
    cout<<a[8]<<endl;
    cout<<a[7]<<endl;
    return 0;
}

C++: #include <iostream>
#include <array>
#include <algorithm>
   
int main(){
    std::array<u_int, 10> heights;
      
    for (u_int i = 0; i < 10; ++i){
        std::cin >> heights[i];
    }
      
    std::sort(heights.begin(), heights.end(), std::greater<u_int>());
      
    for (u_int i = 0; i < 3; ++i){
        std::cout << heights[i] << std::endl;
    }
     
    return 0;
}

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

int main(){
 int mountain,first=0,second=0,third=0;
 for(int i=0;i<10;i++){
  cin>>mountain;
  if(mountain>first){
   third=second;
   second=first;
   first=mountain;
  }else if(mountain>second){
   third=second;
   second=mountain;
  }else if(mountain>third){
   third=mountain;
  }
 }
 cout<<first<<'\n'<<second<<'\n'<<third<<'\n';
 return 0;
}

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>
 using namespace std;
 int main()
 {
 int i=0; int num[10];
 for(;i<10;i++)
 cin>>num[i];
 int temp=0,temp1=0,j=0,k=0;
  for(;j<3;j++) {
  for(i=0;i<10;i++)
   { temp1=temp; temp=temp<num[i]?num[i]:temp; if(temp>temp1) k=i; }
    cout<<num[k]<<endl; temp=0; num[k]=0; }
     return 0;
      }

C++: #include <iostream>

int main(int argc, const char * argv[])
{
    using namespace std;
        int max = 0;
        int second = 0;
        int third = 0;
    
    int n[10];
    
    for(int i = 0; i < 10; i++) cin >> n[i];
    sort(n,n+10,greater<int>());
    max = n[0];
    second = n[1];
    third  = n[2];
    cout << max << "\n" << second << "\n" << third << "\n";
    return 0;
}

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

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

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

int main(int argc, char *argv[]){
  int n;
  vector<int> a;
  while(cin >> n){
    a.push_back(-n);
  }
  sort(a.begin(), a.end());
  std::cout << -a[0] << std::endl;
  std::cout << -a[1] << std::endl;
  std::cout << -a[2] << std::endl;
  return 0;
}

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

int heights[10];

int main(){
for(auto i:heights){
cin>>i;
}

sort(&heights[0],&heights[9]+1);

for(int i=0;i<3;i++){
cout<<heights[9-i]<<endl;
}

return 0;
}

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

int main()
{
    int a[10];
    for(int i=0;i<10;i++)
        cin >> a[i];
    sort(a,a+10,greater<int>());
    for(int i=0;i<3;i++)
        cout << a[i] << endl;
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <stack>
#include <cstdio>
using namespace std;
// int a[10];
// bool ans;
// void dfs(int i,int r,int l){
// 	if(i==10)ans=1;
// 	if(ans)return;
// 	if(a[i]<r&&a[i]<l)return;
// 	if(r<a[i])dfs(i+1,a[i],l);
// 	if(l<a[i])dfs(i+1,r,a[i]);

// }
// int main(){
// 	int t;
// 	cin>>t;
// 	while(t--){
// 		ans=0;
// 		for(int i=0;i<10;i++)cin>>a[i];
// 		dfs(0,0,0);
// 		if(ans)cout<<"YES"<<endl;
// 		else cout<<"NO"<<endl;
// 	}
// }

int main(){
	int a[10];
	for(int i=0;i<10;i++)cin>>a[i];
	sort(a,a+10);
	for(int i=0;i<2;i++)cout<<a[i]<<endl;
	return 0;
}