Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	heighs := make([]int, 10)
	for i := range heighs {
		heighs[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(heighs)))
	for i := 0; i < 3; i++ {
		fmt.Println(heighs[i])
	}
}

C++: #include <iostream>

int main()
{
    int n_1st;
    int n_2nd;
    int n_3rd;
    int n;
    
    n_1st = n_2nd = n_3rd = 0;

    while (std::cin >> n){
        if (n > n_1st){
            n_3rd = n_2nd;
            n_2nd = n_1st;
            n_1st = n;
        }
        else if (n > n_2nd){
            n_3rd = n_2nd;
            n_2nd = n;
        }
        else if (n > n_3rd){
            n_3rd = n;
        }
    }
    
    std::cout << n_1st << std::endl;
    std::cout << n_2nd << std::endl;
    std::cout << n_3rd << std::endl;
    
    return 0;
}

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

template<class T> inline void YES(T condition){ if(condition) cout << "YES" << endl; else cout << "NO" << endl; }
template<class T> inline void Yes(T condition){ if(condition) cout << "Yes" << endl; else cout << "No" << endl; }
template<class T> inline void POSS(T condition){ if(condition) cout << "POSSIBLE" << endl; else cout << "IMPOSSIBLE" << endl; }
template<class T> inline void Poss(T condition){ if(condition) cout << "Possible" << endl; else cout << "Impossible" << endl; }
template<class T> inline void First(T condition){ if(condition) cout << "First" << endl; else cout << "Second" << endl; }
int character_count(string text, char character){ int ans = 0; for(int i = 0; i < text.size(); i++){ ans += (text[i] == character); } return ans; }
long power(long base, long exponent, long module){ if(exponent % 2){ return power(base, exponent - 1, module) * base % module; }else if(exponent){ long root_ans = power(base, exponent / 2, module); return root_ans * root_ans % module; }else{ return 1; }}
struct position{ int y, x; }; position move_pattern[4] = {{-1, 0}, {0, 1}, {1, 0}, {0, -1}}; // double euclidean(position first, position second){ return sqrt((second.x - first.x) * (second.x - first.x) + (second.y - first.y) * (second.y - first.y)); }
template<class itr, class func> void array_output(itr start, itr goal, func out = [](itr x) { return x; } ){ string ans; for(auto i = start; i != goal; i++){ ans += to_string(*i) + " "; } ans.pop_back(); cout << ans << endl; }
template<class itr, class func> void nint_output(itr start, itr goal, func out = [](itr x) { return x; } ){ string ans; for(auto i = start; i != goal; i++){ ans += string(out(*i)) + " "; } ans.pop_back(); cout << ans << endl; }
long gcd(long a, long b){ if(a && b){ return gcd(min(a, b), max(a, b) % min(a, b)); }else{ return a; }}
#define mod long(1e9 + 7)
#define all(x) (x).begin(), (x).end()
#define bitcount(n) __builtin_popcount(n)

int main(){
    int mountains[10];
    for(int i = 0; i < 10; i++){
        cin >> mountains[i];
    }
    sort(mountains, mountains + 10, greater<int>());
    cout << mountains[0] << endl;
    cout << mountains[1] << endl;
    cout << mountains[2] << endl;
}

C++: h = []
10.times {h << gets.to_i}
h.sort.reverse.take(3).each{|hh| puts hh}

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

int main(){
    int i,data[10],best[3];
    for(i=0; i<10; i++){
        cin>>data[i];
    }
    for(i=0; i<3; i++){
        best[i] = 0;
    }
    for(i=0; i<10; i++){
        if(data[i] > best[0]){
            best[2] = best[1];
            best[1] = best[0];
            best[0] = data[i];            
        }
        else if(data[i] > best[1]){
            best[2] = best[1];
            best[1] = data[i];
        }
        else if(data[i] > best[2]){
            best[2] = data[i];
        }
    }
    for(i=0; i<3; i++){
        cout<<best[i]<<endl;
    }
    return 0;
}

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

int main(){
    std::cin.tie(0);
    std::ios::sync_with_stdio(false);

    int a[10];
    int i=0;
    while (std::cin >> a[i]) {
        i++;
    }
    std::sort(a, a+10);
    for (i=9; i>6; i--){
        std::cout << a[i] << std::endl;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int a[10],min1=-1,min2=-1,min3=-1, i,j,k,l;
	for (i = 1; i <= 10; i++) {
		cin >> a[i];
	}
	for (j = 1; j <= 10; j++) {
		if (a[j] > min1) {
			min1 = a[j];
		}
	}
	for (k = 1; k <= 10; k++) {
		if (a[k] > min2 && a[k]!=min1) {
			min2 = a[k];
		}
	}
	for (l = 1; l <= 10; l++) {
		if (a[l] > min3&&a[l]!=min2&&a[l]!=min1) {
			min3 = a[l];
		}
	}
	cout << min1 << endl << min2 << endl << min3  << endl;
	return 0;
}

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

int main(){

	int i=0,n;
	int a[10000];


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

    return 0;
}

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

int main() {
    return ([]() {
        std::function<void()> input;
        std::vector <int> list;
        (input = [&input, &list]() {
            int data;
            if ( std::cin >> data ) {
                list.push_back( data );
                input();
            } else {
                sort( list.rbegin(), list.rend() );
                for_each(
                    list.begin(),
                    list.begin() + 3,
                    [](int x){ std::cout << x << std::endl; }
                );
            }
        })();
        return 0;
    })();
}

C++: #include<iostream>
#include<queue>
using namespace std;
int main(){
  priority_queue<int> mlist;
  int i;
  for(i=0;i<10;i++){
    int dt;
    cin>>dt;
    mlist.push(dt);
  }
  for(i=0;i<3;i++){
    cout <<mlist.top()<<endl;
    mlist.pop();
  }

  return 0;
}

C++: #include <iostream>
//#include <iomanip>
//#include <vector>
#include <string>
#include <algorithm>
#include <functional>

using namespace std;

int main(){

	int h[10];

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

	sort(h,h+10);

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

	return 0;
}

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

int main(){
    int i, t, j;
    int max[3] = {0};
    int mountain[10] = {0};
    
    for(i = 1; i <= 3; i++){
        for(t = 1; t <= 10; t++){
        cin >> mountain[t];
        if(max[i] < mountain[t]) {
            max[i] = mountain[t];
            }
        }
        
        for(j = 1; j <= 10; j++){
            if(max[i] == mountain[j]) mountain[j] = {0};
        }
        
        cout << max[i] << endl;
    }
    
    
    
    
    

    
    return 0;
    
}

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

#define pout(n)  printf ("%d\n", n)

#define rep(i,a,n) for (int i = a;i < n;i++)
#define per(i,n,a) for (int i = n-1;i >= a;i--)

const int d4x[4] = {1, 0, -1, 0};
const int d4y[4] = {0, 1, 0, -1};
const int d8x[8] = { 1,1,0,-1,-1,-1,0,1 };
const int d8y[8] = { 0,1,1,1,0,-1,-1,-1 };
 
typedef long long ll;
using namespace std;
 
int main() {
  int mo[10];
  rep(i,0,10){
    cin >> mo[i];
  }
  sort(mo,mo+10);
  per(i,10,7){
    pout(mo[i]);
  }
  return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a, b, max, max2, max3;
	max = 0;
	max2 = 0;
	max3 = 0;
	for (a = 1; a <= 10; a++) {
		scanf("%d", &b);
		if (b <= 10000) {
			if (b > max) {
				max2 = max;
				max = b;
			}
			else if (b > max2) {
				max3 = max2;
				max2 = b;

			}
			else if (b > max3) {
				max3 = b;
			}
		}
	}
	printf("%d\n", max);
	printf("%d\n", max2);
	printf("%d\n", max3);
	return 0;
}