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<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
typedef long long LL;
vector<LL>v;
int main(){
	REP(i,10){
	    LL a;
	    cin>>a;
	    v.push_back(a);
	}
        sort(v.begin(),v.end());
        reverse(v.begin(),v.end());
	
	REP(i,3){
           cout<<v[i]<<endl;
        }
	return(0);
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

vector<int> height;

int main() {
	for (int i = 0; i < 10; i++) {
		int input;
		cin >> input;
		height.push_back(input);
	}

	sort(height.begin(), height.end());

	for (int i = 9; i >= 7; i--) {
		cout << height[i] << endl;
	}

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

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;
		}
	}
	cout<<endl;
	sort(h, h+10, greater<int>());
	for(short int i=0;i<3;i++){
		cout << h[i] << endl;
	}
	return 0;
}

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

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

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

int main(){
    
    int i;
    int max1, max2, max3;
    std::array <int, 10> hill;
    
    max2 = 0;
    max3 = 0;

    for (i = 0; i < 10; ++i) {
        std::cin >> hill.at(i);
        
        if (i == 0) max1 = hill.at(0);
        
        if (max1 < hill.at(i)) { 
            max2 = max1;                    
            max1 = hill.at(i);
        } else if (max2 < hill.at(i)) {
            max3 = max2;
            max2 = hill.at(i);
        } else if (max3 < hill.at(i)) max3 = hill.at(i);
        else {}
    }
    
    std::cout << max1 << std::endl << max2 << std::endl << max3 << std::endl;
    
    return 0;
}

C++: #include<iostream>
int main(void){
    int h;
    int t[3] = {0, 0, 0};
    for(int i = 0; i < 10; i++){
        std::cin >> h;
        for(int i = 0; i < 3; i++){
            if(t[i] <= h){
                switch(i){
                    case 0:
                        t[i+2] = t[i+1];
                        t[i+1] = t[i];
                        t[i] = h;
                        break;
                    case 1:
                        t[i+1] = t[i];
                        t[i] = h;
                        break;
                }
                break;
            }
        }
    }
    for(int i = 0; i < 3; i++){
        std::cout << t[i] << std::endl;
    }
    return 0;
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  while (true) {}
}

C++: #include<iostream>

using namespace std;

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

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

int main() {
    clock_t cTimeStart, cTimeEnd;
    cTimeStart = clock();           // 現在時刻
    int H[10];
    for(int i=0;i<10;++i){
    	cin>>H[i];
    }
    sort(H,H+10);
    for(int i=0;i<3;++i){
    	    cout<<H[9-i]<<endl;
    }

    cTimeEnd = clock();           // 現在時刻
//    cout<< "処理時間:" <<(cTimeEnd - cTimeStart)/1000 << "[ms]" << endl;

	return 0;
}

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

int main(){

	int mountain[10];

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

C++: 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include<stdio.h>
  
int main(){
    int i,j,t,data[10];
      
    for(i=0;i<10;i++)
    {
        scanf("%d",&data[i]);
    }
      
    for(i=0;i<9;i++)
    {
        for(j=0;j<9-i;j++)
        {
            if(data[j]<data[j+1])
            {
                t=data[j];
                data[j]=data[j+1];
                data[j+1]=t;
            }
        }
    }
    for(i=0;i<3;i++)
    {
        printf("%d\n",data[i]);
    }
  
    return 0;

C++: #include<stdio.h>
int main(){
	int l[10],r[10]={-1};
	int i,j,k,c[10],n=0;
	for(i=0;i<10;i++){
		c[i]=11;
	}
	for(i=0;i<10;i++){
		scanf("%d",&l[i]);
	}
	for(j=0;j<10;j++){
		for(i=0;i<10;i++){
			for(k=0;k<10;k++){
				if(c[k]==i){
					n=1;
				}
			}
			if(!(n==1)){
				if(l[i]>=r[j]){
					r[j]=l[i];
					c[j]=i;
				}
			}
			n=0;
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",r[i]);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int takasa[10];

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

	//????????????
	for (int i = 0; i < 9; i++) {
		for (int j = i+1; j < 10; j++) {
			if (takasa[i] <takasa[j]) {
				swap (takasa[i],takasa[j]);
			}
		}
	}
	
	for (int i = 0; i < 3; i++) {
		cout << takasa[i] << endl;
	}
	return 0;
}

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

using namespace std;

int main() {
  vector<int> mountains;
  for (int i = 0; i < 10; i++) {
    int mountain;
    scanf("%d", &mountain);
    mountains.push_back(mountain);
  }
  sort(mountains.begin(), mountains.end(), greater<int>());
  for (int i = 0; i < 3; i++) {
    printf("%d\n", mountains[0]);
    mountains.erase(mountains.begin());
  }
}