Go: package main

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

var maxint = 10000
var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	scanner.Scan()
	return strconv.Atoi(scanner.Text())
}

func main() {
	scanner.Split(bufio.ScanWords)
	arr := make([]int, 10)
	for i := range arr {
		n, _ := nextInt()
		arr[i] = n
	}

	sort.Slice(arr, func(i, j int) bool {
		return arr[i] >= arr[j]
	})

	arrStr := fmt.Sprintf("%+v", arr[0:3])
	arrStr = arrStr[1:(len(arrStr) - 1)]
	arrStr = strings.Replace(arrStr, " ", "\n", -1)
	fmt.Println(arrStr)
}

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

int main()
{
	int x[10];
	int i,j,tmp;
	for(i=0;i<10;i++){
		cin >> x[i];
	}
	for(i=0;i<n-1;i++){
		for(j=n-1;j>i;j--){
			if(x[j]<x[j-1]){
				tmp = x[j];
				x[j] = x[j-1];
				x[j-1] = x[j];
			}
		}
	}
	cout <<x[0] <<endl;
	cout <<x[1] <<endl;
	cout <<x[2] <<endl;
		
		
	for(i=1;i<=9;i++){
		for(j=1;j<=9;j++){
			cout << i << "x" << j <<"=" <<i*j <<endl;
		}
	}
	
	
	return 0;
}

C++: //
//  main.cpp
//  AOJ_V0_0001
//
//  Created by anzai on 2015/08/06.
//  Copyright (c) 2015??´ anzai. All rights reserved.
//

#include<iostream>
using namespace std;

int main(){
    
    int array[10] = {0};
    
    for (int i = 0; i < 10; i++) {
        cin >> array[i];
        
    }
    int first = 0;
    int second = 0;
    int third = 0;
    for (int i = 0; i < 10; i++) {
        if (first <= array[i]) {
            third = second;
            second = first;
            first = array[i];
        }
        else if (second <= array[i]){
            third = second;
            second = array[i];
        }
        else if (third <= array[i]){
            third = array[i];
        }
    }
    cout << first << endl;
    cout << second << endl;
    cout << third << endl;
    
    return 0;
}

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

int main()
{
    std::vector<int> high(10);

    for(int i = 0; i < 10; ++i) std::cin>> high[i];

    std::sort(high.begin(), high.end());
    std::reverse(high.begin(), high.end());
    for(int i = 0; i < 3; ++i) std::cout << high[i] << std::endl;

    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;



//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];

	bubble_sort(a,a+10);


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

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define R__64 18446744073709551616//2^64
#define R__InFinity 100000000;
#define R__PI acos(-1.0)
template <class R> string R__MonthName(R name){string mon[15];mon[1]="January";mon[2]="February";mon[3]="March";mon[4]="April";mon[5]="May";mon[6]="June";mon[7]="July";mon[8]="August";mon[9]="September";mon[10]="October";mon[11]="November";mon[12]="December";return mon[name];}
template <class R> R R__MonthDay(R num){R month[13];month[1]=31;month[2]=28;month[3]=31;month[4]=30;month[5]=31;month[6]=30;month[7]=31;month[8]=31;month[9]=30;month[10]=31;month[11]=30;month[12]=31;return month[num];}
template <class R> R R__GCD(R a,R b){if(b==0) return a;else return R__GCD(b,a%b);}
template <class R> R R__LCM(R a,R b){return (a*b)/R__GCD(a,b);}
template <class R> R R__POW( R a, R b){if(b==0) return 1; R x=a;for(R i=2;i<=b;i++) a=a*x;return a;}
template <class R> R R__BigMod(R a,R b,R c){if(a==0) return 0;if(b==0) return 1;if(b%2==0){R x=R__BigMod(a,b/2,c)%c;return (x*x)%c;}else return  ((a%c)*R__BigMod(a,b-1,c)%c)%c;}
template <class R> R R__Factorial(R a){R b=1;for(R i=1;i<=a;i++)b=b*i;return b;}
template <class R> R R__BinarySearch(R a[],R l,R h,R n){while(l<=h){R m=(l+h)/2;if(n<a[m])h=m-1;else if(n>a[m])l=m+1;else return m;} return -1;}

long long a[100],i;

int main()
{
    //time_t t1=clock();
    //freopen("input.txt","r",stdin);//freopen("output.txt","w",stdout);
    while(cin>>a[0])
    {
        for(i=1;i<=9;i++)
            cin>>a[i];
        sort(&a[0],&a[10]);
        cout<<a[9]<<"\n"<<a[8]<<"\n"<<a[7]<<"\n";
    }
    //time_t t2=clock();
    //cout<<(t2-t1);
    return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <string>
#include <map>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	vector<int> v;
	for(int i=1;i<=10;i++){
		int h;
		cin >> h;
		v.push_back(h);
	}
	std::sort(v.begin(), v.end());
	std::reverse(v.begin(), v.end());
	for(int i=0;i<3;i++){
		cout << v[i] << endl;
	}
	return 0;
}

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

int main()
{
	int n[10],i=0;

	while (cin >> n[i])
		i++;
	sort(n,n+i-1,greater<int>());
	for (int j=0; j < 3; j++) {
		cout << n[j] << endl;
	}
	return 0;
}

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

using namespace std;

int main()
{
    int i, j, temp;
    int number[15];

    for (i=0; i<10; i++)
    {
        scanf("%d", &number[i]);
    }

    for (i=0; i<5; i++)
    {
        for (j=i+1; j<5; j++)
        {
            if (number[i] < number[j])
            {
                temp = number[i];
                number[i] = number[j];
                number[j] = temp;
            }
        }
    }

    for (i=0; i<3; i++)
    {
        printf("%d\n", number[i]);
    }

    return 0;
}

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

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


int main(void){

	int a[11],i,max1,max2,max3;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}


	max1 = 0;
	max2 = 0;
	max3 = 0;

	for (i=1; i<11; ++i){
		if (a[max1] < a[i]){max1 = i;}
	}
		for (i=1;i<11;++i){
			if (a[i] < a[max1]){
				if (a[max2] < a[i]){max2 = i;}
		}
		}
			for (i=1;i<11;++i){
			if (a[i] < a[max2]){
				if (a[max3] < a[i]){max3 = i;}
		}
			}

		cout << a[max1] << endl;
		cout << a[max2] << endl;
		cout << a[max3] << endl;
		

		return 0;
	}

C++: #include <iostream>
using namespace std;
int max(int x[], 10)
{
	int i,j;
	j=0;
	for(i=1; i<n; i++)
		if(x[i]<x[j]) j=i;
		return j;
}
void sel_sort(int x[], 10)
{
	int i, j;
	for(i=10; i>1; i--)
		{ j=max(x,i);   int temp=x[j];   x[j]=x[i-1];  x[i-1]=temp; }
	}
void main()
{
	int a[10], i;
	while(cin>>a[0])
	{
	for(i=1; i<10; i++)
		cin>>a[i];
	sel_sort(a, 10);
	for(i=0; i<3; i++)
		cout<<a[i]<<endl;
	}
	
}