Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	counter := 0
	var mountain []int
	for scanner.Scan() {
		i, err := strconv.Atoi(scanner.Text())
		if err != nil {
			break
		}
		mountain = append(mountain, i)
		counter++
		if counter == 10 {
			break
		}

	}
	sort.Ints(mountain)
	fmt.Println(mountain[9])
	fmt.Println(mountain[8])
	fmt.Println(mountain[7])
}

C++: fn main(){
    let mut hs: Vec<i32> = vec![];
    for _i in 0..10{
        let n=readln();
        hs.push(n);
    }
    hs.sort();
    for i in (7..10).rev(){
        println!("{}",hs[i]);
    }
}
    

// --- template ---
#[allow(unused_imports)]
use std::cmp::{max, min};
#[allow(unused_imports)]
 
pub trait FromLn {
    fn fromln(s: &str) -> Self;
}
pub fn readln<T: FromLn>() -> T {
    let mut buf = String::new();
    let _ = ::std::io::stdin().read_line(&mut buf).unwrap();
    T::fromln(buf.trim())
}
pub fn readlns<T: FromLn>(n: usize) -> Vec<T> {
    let mut vs = vec![];
    for _ in 0..n {
        vs.push(readln());
    }
    vs
}
macro_rules! fromln_primitives {
    ($($t:ty),*) => { $(
        impl FromLn for $t {
            fn fromln(s: &str) -> $t {
                s.parse().unwrap()
            }
        }
    )* }
}
fromln_primitives!(
    String,
    bool,
    f32,
    f64,
    isize,
    i8,
    i16,
    i32,
    i64,
    usize,
    u8,
    u16,
    u32,
    u64
);
impl<T> FromLn for Vec<T>
where
    T: FromLn,
{
    fn fromln(s: &str) -> Vec<T> {
        s.split_whitespace().map(T::fromln).collect()
    }
}
impl FromLn for Vec<char> {
    fn fromln(s: &str) -> Vec<char> {
        s.chars().collect()
    }
}
macro_rules! fromln_tuple {
    ($($t:ident),*) => {
        impl<$($t),*> FromLn for ($($t),*) where $($t: FromLn),* {
            fn fromln(s: &str) -> ($($t),*) {
                let mut it = s.split_whitespace();
                let t = ($($t::fromln(it.next().unwrap())),*);
                assert_eq!(it.next(), None);
                t
            }
        }
    }
}
fromln_tuple!(A, B);
fromln_tuple!(A, B, C);
fromln_tuple!(A, B, C, D);
fromln_tuple!(A, B, C, D, E);
fromln_tuple!(A, B, C, D, E, F);

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

int main(){

	int h[9];
	int i,j;
	int temp;

	h[0]=1819;
	h[1]=2003;
	h[2]=876;
	h[3]=2840;
	h[4]=1723;
	h[5]=1673;
	h[6]=3776;
	h[7]=2848;
	h[8]=1592;
	h[9]=922;

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

			if(h[i]>h[j]){
			temp=h[i];
			h[i]=h[j];
			h[j]=temp;
		
			}
		}
	}
	
	cout << "最も高い山は :" << h[0] << endl;

	cout << "２番目に高い山は :" << h[1] << endl;

	cout << "３番目に高い山は :" << h[2] <<endl;


	return 0;


}

C++: #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#pragma warning(disable:4996)

int main()
{

	int MontainIn[10];

	for (int nCnt = 0; nCnt < 10; nCnt++)
		scanf("%d", &MontainIn[nCnt]);

	for (int nCnt = 0; nCnt < 10; nCnt++)
	{
		for (int nCnt2 = 0 ; nCnt2 < 10; nCnt2++)
		{
			if (nCnt2 == nCnt)
				continue;

			if (MontainIn[nCnt] > MontainIn[nCnt2])
			{
				MontainIn[nCnt] ^= MontainIn[nCnt2];
				MontainIn[nCnt2] ^= MontainIn[nCnt];
				MontainIn[nCnt] ^= MontainIn[nCnt2];
			}
		}
	}

	for (int nCnt = 0; nCnt < 3; nCnt++)
		printf("%d\n", MontainIn[nCnt]);

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int t1,t2,t3,T;
	for(int i=0;i<10;i++){
		cin>>T;
		if(T>=t1){
			t3=t2;
			t2=t1;
			t1=T;
		}
		else if(T>=t2){
			t3=t2;
			t2=T;
		}
		else if(T>=t3){
			t3=T;
		}
	}
	cout<<t1<<endl<<t2<<endl<<t3<<endl;
	return 0;
}

C++: #include<stdio.h>
    main()
    {
        int a[15];
        int i,j,k;
        for(i=0;i<10;i++)
        {
            scanf("%d",&a[i]);
        }

        for(i=0;i<9;i++)
        {
            for(j=i+1;j<9;j++)
            {
                if(a[i]<a[j])
                {
                    k=a[i];
                    a[i]=a[j];
                    a[j]=k;
                }


            }
        }
        printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
        return 0;

    }

C++: #include <iostream>
#include <queue>
#include <vector>
#include <set>
#include <algorithm>
#include <stdio.h>
//#define int long long
inline int in() { int32_t x; scanf("%d", &x); return x ;}
using namespace std;
const int INF = 1e18;
const int MAX_N = 1e5 + 5;
struct top3
{
    int a[4] = {0 , 0 , 0 , 0};
    void add(int x)
    {
        a[3] = x;
        sort(a , a + 4 , greater<int>());
    }
}tp;
int32_t main()
{
    int x;
    
    while (scanf("%d",&x) != EOF)
    {
        tp.add(x);
    }
    
    cout << tp.a[0] << endl << tp.a[1] << endl << tp.a[2] << endl;
}

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

int main()
{
 int i;
 vector<int> a;
 int c;
 for(i=0;i<10;i++)
 {
  cin>>c;
  a.push_back(c);
 }

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

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

  return(0);
}

C++: #include <stdio.h>

int main(){

	int a[10] = {}, i, g, n;
	for (i = 0; i < 10; i++){ scanf("%d", &a[i]); }
	for (n = 0; n < 9; n++){
		for (i = 0; i < 9; i++){
			if (a[i] < a[i + 1]){
				g = a[i];
				a[i] = a[i + 1];
				a[i + 1] = g;
			}
		}
	}
	for (i = 0; i < 3; i++){ printf("%d\n", a[i]); }
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	typedef unsigned short int mew;
	mew mountain[10];
	for (int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}

	mew taller[3];
	mew a, b, c;

	a = mountain[0];
	b = mountain[1];
	c = mountain[2];

	for (int y = 3; y <= 9; y++) {
		if (a<=b){
			if (a<=c){
				if (a < mountain[y]) {
				???a = mountain[y];}
			}
			else{
				if (c < mountain[y]) {
					c = mountain[y];}
			}
		}
		else if (b<=c)
		{
			if (b < mountain[y]) {
				b = mountain[y];}
		}
	}

	//biggest->taller[0],bigger->taller[1],taller[2]
	{
		if (a >= b&&a >= c)
		{
			taller[0] = a;
			if (b >= c)
			{
				taller[1] = b;
				taller[2] = c;
			}
			else {
				taller[1] = c;
				taller[2] = b;
			}
		}
		if (b >= a&&b >= c)
		{
			taller[0] = b;
			if (a >= c)
			{
				taller[1] = a;
				taller[2] = c;
			}
			else {
				taller[1] = c;
				taller[2] = a;
			}
		}
		if (c >= b&&c >= a)
		{
			taller[0] = c;
			if (b >= a)
			{
				taller[1] = b;
				taller[2] = a;
			}
			else {
				taller[1] = a;
				taller[2] = b;
			}
		}
	} 

	cout << taller[0] << endl;
	cout << taller[1] << endl;
	cout << taller[2] << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;

void buble_sort(int high[]){
    int i,j,v;

    for(i = 0;i < 9;i++){
        v = i;
        for(j = i;j <= 9;j++){
            if(high[v] < high[j]){
                v = j;
            }
        }
        int box = high[i];
        high[i] = high[v];
        high[v] = box;

    }
}

int main() {
    int i,high[10];

    for (i = 0;i <= 9;i++){
        cin >> high[i];
    }

    buble_sort(high);

    for(i = 0;i <= 2;i++){
        cout << high[i] << endl;
    }

    return 0;
}

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

int main() {
	int n[10],top,tap,min,h=0;
	for(int i=0;i<10;i++){
		cin>>n[i];
	}
	for(int j=0;j<10;j++){
				if(top<n[j]){
					h=top;
					min=tap;
					top=n[j];
					tap=h;
					h=0;
				}
				else if(tap<n[j]){
					min=tap;
					tap=n[j];
				}
				else if(min<n[j]){
					min=n[j];
				}
			}
	cout<<top<<"\n"<<tap<<"\n"<<min<<endl;
	return 0;
}

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

using namespace std;

int main(){

  int in;
  vector<int> V;

  while(cin >> in){
    V.push_back(in);
  }

  sort(V.begin(), V.end());
  reverse(V.begin(), V.end());

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

  return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>

int int_cmp(const int *a, const int *b)
{
    if (*a > *b)
        return (-1);
    else if (*a < *b)
        return (1);
    return (0);
}

int main(void){
    int i;
	int x[10];
	for(i=0;i<10;i++){
		scanf("%d",&x[i]);
	}
	qsort(x,10,sizeof(int),  (int(*)(const void*, const void*))int_cmp);

	printf("%d\n%d\n%d\n",x[0],x[1],x[2]);

}