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>

void sort(int* a);

int main()
{
    int i,high[10];
    for(i = 0;i < 10;++i){
        std::cin >> high[i];
    }
    sort(&high[0]);
    std::cout << high[0];
    std::cout << high[1];
    std::cout << high[2];
}

void sort(int* a)
{
        int i,first = 0,secand = 0,third = 0;
        for(i = 0;i < 10;++i){
           if(first < *(a + i)){
               first = *(a + i);
           }else if(secand < *(a + i)){
               secand = *(a + i);
           }else if(third < *(a + i)){
               third = *(a + i);
           }
        }
        *a = first;
        *(a + 1) = secand;
        *(a + 2) = third;
}

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

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

int main(){
	int a1,a2,a3,in;
	a1=a2=a3=0;
	
	for(int i=0;i<10;i++){
		cin>>in;
		if(in>a1){
			a3=a2;
			a2=a1;
			a1=in;
		}else if(in>a2){
			a3=a2;
			a2=in;
		}else if(in>a3){
			a3=in;
		}
	}
	cout<<a1<<endl<<a2<<endl<<a3<<endl;
	return 0;
}

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

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

C++: lis=[];

for i in range(10):
    h=int(input());
    lis.append(h);
    
for i in range(10):
    for j in range(i+1,10):
        if lis[i]<lis[j]:
            a=lis[i];
            lis[i]=lis[j];
            lis[j]=a;
            
for i in range(3):
    print(lis[i]);

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

int main(){
  using namespace std;
  set<int, greater<int> > mts{};
  for(int i = 0; i < 10; i++){
    int tmp = 0;
    scanf("%d", &tmp);
    mts.insert(tmp);
  }
  int count = 0;
  for(int const mt : mts){
    printf("%d\n", mt);
    if(++count >= 3) break;
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
bool h[1000010]={false};
int main(){
	vector<int>in(10);
	rep(i,10)cin>>in[i];
	sort(all(in));
	cout<<in[9]<<endl;
	cout<<in[8]<<endl;
	cout<<in[7]<<endl;
	
}

C++: #include <cstdio>
int main(){
 int top3[3];
 int i,tmp,data;
 for(i=0;i<3;i++) top3[i]=0;
 for(i=0;i<10;i++){
  scanf("%d",&data);
  if (top3[2]>data) {} 
  else {
   top3[2]=data;
   if (top3[1]>data) {} 
   else {
    top3[2]=top3[1];
    if (top3[0]>data) top3[1]=data;
    else {
     top3[1]=top3[0];
     top3[0]=data;
    };
   };
  };
 };
 for(i=0;i<3;i++)
    printf("%d\n",top3[i]);
 return 0;
};

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

using namespace std;

int main() {
	vector<int> heights;
	int meter;

	for(int index = 0; index < 10; ++index) {
		cin >> meter;
		heights.push_back(meter);
	}
	
	reverse(heights.begin(), heights.end());
	
	cout << heights[0] << endl;
	cout << heights[1] << endl;
	cout << heights[2] << endl;
	
	return 0;
}

C++: #include <stdio.h>
#include <vector>
#include <algorithm>

int main()
{
  std::vector<int> hills(10);
  for (int i = 0; i < 10; i++) {
    int temp;
    scanf("%d", &temp);
    hills[i] = temp;
  }
  std::sort(hills.begin(), hills.end());
  std::reverse(hills.begin(), hills.end());
  for (int i = 0; i < 3; i++) {
    printf("%d\n", hills[i]);
  }
  return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int mountain[10];
	int a, b, c;

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

	a = mountain[0];
	b = mountain[1];
	c = mountain[2];

	for (int y = 3; y <= 9; y++) {
		if (a <= b) {
			if (a <= c) {
				if (a < mountain[y]) {
					a = mountain[y];
				}
			}
			else {
				if (c < mountain[y]) {
					c = mountain[y];
				}
			}
		}
		else if (b <= c)
		{
			if (b < mountain[y]) {
				b = mountain[y];
			}
		}
	}
	if (a <= b) {
		if (a <= c) {
			if (b <= c) {
				cout << c << "\n" << b << "\n" << a << "\n";
			}
			else {
				cout << b << "\n" << c << "\n" << a << "\n";
			}
		}
		else cout << b << "\n" << a << "\n" << c << "\n";
	}
	else if (a <= c) {
		cout << c << "\n" << a << "\n" << b << "\n";
	}
	else if (b <= c) {
		cout << a << "\n" << c << "\n" << b << "\n";
	}
	else cout << a << "\n" << b << "\n" << c << "\n";

	char a____;
	cin >> a____;

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int arr[1000],n=10;
    for(int i=0; i<10; i++)
    {
        cin>>arr[i];
    }
    sort(arr,arr+n);
    for(int i=9; i>=7; i--)
    {
        cout<<arr[i]<<endl;
    }
}

C++: 
#include <stdio.h>
const int N = 15;
int main() {
    int a[N] = {0};
    int i, j, tmp;
    for(i = 0; i < 10; i++)
    {
        scanf("%d", &a[i]);
    }
    for(i = 0; i < 10; i++)
    {
        for(j = i; j < 10; j++)
        {
            if(a[i] < a[j])
            {
                tmp = a[i];
                a[i] = a[j];
                a[j] = tmp;
            }
        }
    }
    printf("%d\n%d\n%d\n", a[0], a[1], a[2]);
    return 0;
}

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

int main()
{
	int a[s];
	for (int i = 0; i < s; i++)
	{
		cin>>a[i];
	}
	for (int i = 0; i < s; i++)
	{
		for (int j = i+1; j <= s; j++)
		{
			if(i==3)
				break;
			if(a[i]<a[j])
			{
				int temp=a[i];
				a[i]=a[j];
				a[j]=temp;
			}
		}
	}
	for (int i = 0; i < 3; i++)
	{
		cout<<a[i]<<endl;
	}
	
	return 0;
}

C++: #include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

typedef long long ll;

using namespace std;

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

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

	cout << h[0] << endl << h[1] << endl << h[2];
	while(1);
	

	return 0;
}

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

int main(){
    int mountain[10];
    
    for(int i=0;i<10;i++)
        //scanf("%d",&mountain[i]);
	cin>>mountain[i];
    for(int i=1;i<9;i++){
        for(int j=0;j<=i;j++){
	    if(mountain[j]<mountain[j+1]){
                int temp;
		temp = mountain[j];
		mountain[j] = mountain[j+1];
		mountain[j+1] = mountain[j];
	    }
	}
    }

    //結果出力
    for(int i=0;i<3;i++)
         cout<<mountain[i]<<'\n';
    return 0;
}