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>
#include <vector>
#include <algorithm> 
using namespace std;

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

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

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

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

C++: #include <bits/stdc++.h>
using namespace std;

typedef long int lint;
typedef long long int llint;
typedef pair<int, int> pii;
typedef pair<int, string> pis;
typedef pair<long, long> pll;

#define EACH(t, c) for (auto&& t : c)
#define ALL(c) begin(c), end(c)
#define FOR(i, s, e) for (int i = (s); i < (int)(e); ++i)
#define REP(i, n) FOR(i, 0, n)
#define endl '\n'
#define fk first
#define sv second

const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
const int MOD = (int)1e9 + 7;
const int INF = 999999999;

template<typename T>
void print(const std::vector<T>& v, char sep=' ') {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i != 0) cout << sep;
    cout << v[i];
  }
  cout << endl;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a[10];

  REP(i, 10) {
    cin >> a[i];
  }
  sort(ALL(a));

  REP(i, 3) {
    cout << a[9 - i] << endl;
  }
}

C++: A=[]
for i in range(10):
	A.append(int(input()))
A.sort()
A.reverse()
for i in range(3):
	print(A[i])

C++: // includes
#include <cstdio>
#include <cstdint>
#include <iostream>
#include <iomanip>
#include <string>
#include <queue>
#include <stack>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <algorithm>
#include <utility>
#include <functional>
#include <cmath>
#include <climits>
#include <bitset>

// macros
#define ll long long int
#define pb push_back
#define mk make_pair
#define pq priority_queue
#define FOR(i, a, b) for(int i=(a); i<(b);++i)
#define rep(i, n) FOR(i, 0, n)

using namespace std;

//  types
typedef pair<int, int> P;
typedef pair<ll, int> Pl;
typedef pair<ll, ll> Pll;
 
// constants
const int inf = 1e9;
const ll linf = 1LL << 50;
const double EPS = 1e-10;

// solve

int main(int argc, char const* argv[])
{
  vector<int> h;
  rep(i, 10){
    int x;
    cin >> x;
    h.pb(x);
  }
  sort(h.begin(), h.end());
  cout << h[9] << endl;
  cout << h[8] << endl;
  cout << h[7] << endl;
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;int a[10],*c=a-1;int main(){while(cin>>*++c);sort(a,a+10);while(c>a+7)cout<<*--c<<endl;}

C++: #include <bits/stdc++.h>
using namespace std;
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG true
// sort(a.begin(), a.end(), std::greater<int>());

/*
std::vector<std::string> split(const std::string &input, char delimiter)
{
    std::istringstream stream(input);

    std::string field;
    std::vector<std::string> result;
    while (std::getline(stream, field, delimiter))
    {
        result.push_back(field);
    }
    return result;
}
*/

int main()
{
    //変数の宣言
    int a[10];
    int i = 0;
    //入力
    while (scanf("%d", &a[i++]) + 1);
    //降順にsort
    for(int i=0;i<10;i++){
        for(int j=i+1;j<10;j++){
            int temp=0;
            if(a[i]<a[j]){
                //入れ替える(swap)
                temp=a[i];
                a[i]=a[j];
                a[j]=temp;
            }
        }
    }
    for(int i=0;i<3;i++){
        printf("%d\n",a[i]);
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

#define ARRAY_SIZE 10

void sort(int array[],int size){
    int tmp;
    for(int i=0;i<size;i++){
        for(int j=size-1;j>i;j--){
            if(array[j]>array[j-1]){
                tmp=array[j];
                array[j]=array[j-1];
                array[j-1]=tmp;
            }
        }
    }
}

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

C++: import java.util.Scanner;
import java.util.Arrays;

class Main{
    public static void main(String args[]){
        int[] h = new int[10];
        Scanner scan = new Scanner(System.in);
        for(int i = 0; i < 10; i++){
            h[i] = Integer.parseInt(scan.next());
        }
        Arrays.sort(h);
        System.out.println(h[9]);
        System.out.println(h[8]);
        System.out.println(h[7]);
    }
}

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

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

	std::sort(high.begin(), high.end());

	std::cout << high[9] << " " << high[8] << " " << high[7] << std::endl;

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<functional>
#include<algorithm>
#define rep(i,a,b) for(int i=a;i<b;i++)
using namespace std;
vector<int> num;
int main(){
	int x;
	rep(i,0,10){
		cin>>x;
		num.push_back(x);
	}
	sort(num.begin(),num.end(),greater<int>());
	rep(i,0,3)
		cout<<num[i]<<endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
int M[10];

void bubbleSort(int M[], int N) {
	int flag = 1;
	while (flag) {
		flag = 0;
		for (int i = N - 1; i > 0; --i) {
			if (M[i - 1] > M[i]) {
				int t = M[i];
				M[i] = M[i - 1];
				M[i - 1] = t;
				flag = 1;
			}
		}
	}
}

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

	bubbleSort(M, 10);

	for (int i = 1; i < 4; ++i) {
		cout << M[10 - i] << endl;
	}
}

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

int main(){
	int height[10] = {0};

	for(int i = 0; i < 10; i++){
		cin >> height[i];
	}
	
	int temp = 0;
	for(int i = 0; i < 3; i++){
		for(int j = 0; j < 9-i; j++){
			if(height[j] > height[j+1]){
				temp = height[j];
				height[j] = height[j+1];
				height[j+1] = temp;
			}
		}
	}
	
	cout << height[9] << endl;
	cout << height[8] << endl;
	cout << height[7] << endl;
	
	return 0;
}

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

int main(void) {
    std::vector<u_int> vec;

    u_int a;
    while (std::cin >> a) {
        vec.push_back(a);
    }

    std::sort(vec.begin(), vec.end(), std::greater<u_int>());
    for (u_int i = 0; i < 3; ++i) {
        std::cout << vec[i] << std::endl;
    }

    return 0;
}