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>
#include <algorithm>
using namespace std;
int main(){
	int a[10];
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	sort(a,a+10);
	for(int i=0;i<3;i++){
		cout<<a[i]<<endl;
	}
	return 0;
}

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

using namespace std;
int main() {
    vector<int> h;
    for(int i=0;i<10;i++){
        int tmp;
        cin >> tmp;
        h.push_back(tmp);
    }

    sort(begin(h),end(h));

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

}

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

int main()
{
    int a[10];
    int i;

    for(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++: #include<iostream>

using namespace std;

int main() {
	int x = 0;
	int y = 0;
	int z = 0;
	int a[10];
	for(int i=0;i<10;i++){
		cin >> a[i];
	}
	for(int j=0;j<10;j++){
		if(x < a[j]) {
			z = y;
			y = x;
			x = a[j];
		}else if (y < a[j]){
			z = y;
			y = a[j];
		}else if (z < a[j]){
			z = a[j];
		}
	}
	cout << x << endl;
	cout << y << endl;
	cout << z << endl;
	return 0;
}

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

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

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

 using namespace std;

 int main(){

     ifstream ifs("input1.txt");

     int i;
     int height[3]={};
     int tmp, tmp2;
     string str;

     while(getline(ifs,str)){
         sscanf(str.c_str(),"%d",&tmp);
         if(0<=tmp && tmp <=10000){
             for(i=0;i<3;i++){
                 if(height[i] < tmp){
                     tmp2 = height[i];
                     height[i] = tmp;
                     tmp = tmp2;
                 }
             }
         }
     }

     for(i=0;i<3;i++){
         cout << height[i] << endl;
     }

     return 0;
 }

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

int main()
{
	int i, h;
	int mh[3] = {0};

	for(i=0;i<10;i++){

		cin>>h;
		if(0<=h && h<=10000)
		if(mh[0] < h){
			mh[2] = mh[1];
			mh[1] = mh[0];
			mh[0] = h;
		}
		else if(mh[1] < h){
			mh[2] = mh[1];
			mh[1] = h;
		}
		else if(mh[2] < h) mh[2] = h;

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

	

	return 0;
}

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

int main() {
  vector<int> v;
  for(int i=0; i<10; i++) {
    int x;
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(),v.end(), greater<int>());
  for(int i=0; i<3; i++)
    cout << v[i] << endl;
}

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

using namespace std;

int main(void){
	//FILE* fp_in = freopen("data.txt", "r", stdin);
	int height[10];
	for(int i = 0; i < 10; i++)
		cin >> height[i];

	sort(height,height + 10);

	for(int i = 9; i >= 7; i--)
		cout << height[i] << endl;
	//while(1){}
    return 0;
}

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

int main(){
	short int h[10]={};
	

	for(short int i=1; i<=10;i++){
		cin >> h[i];
		if(!(0<=h<=10000)){
			i--;
			continue;
		}
	}
	sort(h, h+10, greater<int>());
	for(short int i=0;i<3;i++){
		cout << h[i] << endl;
	}
	return 0;
}

C++: #include<stdio.h>

int main()
{
	int high[10];
	int cases;
	
	for(int i=0;i<9;i++)
	{
		printf("height of mountain %d",i);
		scanf("%d",&high[i]);
		printf("\n");
	}
	
	
	for(int i=0;i<9;i++)
	{
		for(int j=i+1; j<10; j++)
		{
			if(high[i] < high[j])
			{
				cases = high[i];
				high[i] = high[j];
				high[j] = cases;
			}
		}
	}
	
	printf("%d\n",high[0]);
	printf("%d\n",high[1]);
	printf("%d\n",high[2]);
	
	return 0;
}

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

int main(){

	int input[10], temp, i, j;
	
	for(i=0; i < 10; i++){
	
	cin >> input[i];
	
	}

	for(i = 0; i < 10; i++){
		for(j= 0; j < 9; j++){
			if(input[j] < input[j+1]){
				temp = input[j];
				input[j] = input[j+1];
				input[j+1] = temp;
				}
			}
		}
		
	for(i = 0; i < 3; i++){
	
	cout << input[i] << endl;
	
	}

	return 0;
	
}

C++: #include<iostream>
#include<algorithm>
main(){int a[10],i;for(i=0;i<10;i++)std::cin<<a[i];std::sort(a,a+10);printf("%d%d%d\n",a[0],a[1],a[2]);}

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

void bubbleSort(vector<int> &h)
{
	int tmp;
	for (int i = 0; i < h.size() - 1; i++)
	{
		for (int j = 0; j < h.size() - 1 - i; j++)
		{
			if (h[j] < h[j + 1])
			{
				tmp = h[j + 1];
				h[j + 1] = h[j];
				h[j] = tmp;
			}
		}
	}
}

int main()
{
	vector<int> height(10);
	for (int i = 0; i < 10; i++)
	{
		cin >> height[i];
	}
	bubbleSort(height);
	for (int i : height)
	{
		cout << i << endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define pb push_back
using namespace std;
typedef long long ll;
struct edge{int to;ll cost;};
typedef pair<ll,int> P;
const ll INF=1000000000000LL;
const ll MOD=1000000007LL;
const ll MAX=100010;
int main(){
	int a[10];
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	sort(a,a+10,greater<int>());
	cout<<a[0]<<endl;
	cout<<a[1]<<endl;
	cout<<a[2]<<endl;
	return 0;
}

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

int main() {
	multiset<int, greater<int>> ms; int temp;
	for (int i = 0; i < 10; i++) { cin >> temp; ms.insert(temp); }
	auto itr = ms.begin();
	for (int i = 0; i < 3; i++) { cout << *itr << endl; itr++; }
	return 0;
}

C++: /*************************************************************************
    > File Name: 2387.cpp
    > Author: xudian
    > Email: xudianc@gmail.com
    > Created Time: 五 12/22 09:22:23 2017
 ************************************************************************/

#include <iostream>
#include <algorithm>
#include <cstring>

using namespace std;

const int maxn = 1010;
const int inf = 0x3f3f3f3f;
int mp[maxn][maxn];
bool vis[maxn];
int ans[maxn];
int T, N;
void dijkstra(int st){
	memset(vis, false, sizeof vis);
	ans[1] = 0;
	for (int i = 1; i <= N; ++i){
		int tmp = inf;
		for (int j = 1; j <= N; ++j){
			if (!vis[j] and tmp > ans[j]){
				tmp = ans[st = j];
			}
		}
		vis[st] = true;
		for (int j = 1; j <= N; ++j){
			ans[j] = min(ans[j], ans[st] + mp[st][j]);
		}
	}
}
int main(){
	ios::sync_with_stdio(false);
	cin.tie(0);
	while (cin >> T >> N){
		memset(mp, 0x3f, sizeof mp);
		memset(ans, 0x3f, sizeof ans);
		int a,b,dis;
		for (int i = 0; i < T; ++i){
			cin >> a >> b >> dis;
			if (mp[a][b] > dis){
				mp[a][b] = mp[b][a] = dis;
			}
		}
		dijkstra(1);
		cout << ans[N] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <functional>
using namespace std;
int	a[20];
int main() {
	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>
using namespace std;
  
int main(){
  int a[3]={};
  for(int i=0;i<10;i++){
    int temp;
    cin>>temp;
    for(int j=0;j<3;j++){
      if(a[j]<=temp&&j!=2){
    a[j+1]=a[j];
    a[j]=temp;
    break;
      }else if(a[j]<=temp&&j==2){
a[j]=temp;
break;
}
    }
  }
  for(int i=0;i<3;i++){
    cout<<a[i]<<endl;
    }
  return 0;
}