Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

C++: import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static void main(String[]args){
		ListOfTop3Hills();
	}
	
	public static void QQ(){
		for(int i=1;i<10;i++){
			for(int j=1;j<10;j++)System.out.println(i+"x"+j+"="+(i*j));
		}
	}
	
	public static void ListOfTop3Hills(){
		Scanner scan = new Scanner(System.in);
		List<Integer> list = new ArrayList<Integer>();
		
		for(int i=0;i<10;i++)list.add(scan.nextInt());
		Collections.sort(list);
		System.out.print(list.get(9)+"\n"+list.get(8)+"\n"+list.get(7));
	}
}

C++: #include <iostream>
#define N 10

using namespace std;

void swap(int& a, int& b){
	int tmp;
	if (a > b){
		tmp = a;
		a = b;
		b = tmp;
	}
}

void bubble(int mountain[N]){
	for (int i=0; i<(N-1); ++i){
		for (int j=i; j<(N-1); ++j){
			swap(mountain[j], mountain[j+1]);
		}
	}
}


int main(void){
	int mountain[N] = {0, };
	for (int i=0; i<N; ++i){
		cin >> mountain[i];
		if ((mountain[i] < 0) || (mountain[i] > 10000)){
			cout << "Range out!" << endl;
			return -1;
		}
	}
	bubble(mountain);
	//cout << "output!" << endl;
	for (int i=9; i>=7; --i){
		cout << mountain[i] << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
int a[10]={};
for(int i=0;i<10;i++)cin>>a[i];
sort(a,a+10);
reverse(a,a+10);
printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
}

C++: #include<iostream>?¬
   using namespace std;?¬
   ?¬
   const int MAX_N = 9;?¬
   int a[MAX_N];?¬
     ?¬
   int main(){?¬
   ?¬
       for(int i=0; i<=MAX_N; i++){?¬
           cin >> a[i];?¬
       }?¬
        ?¬
       sort(a,a+10);?¬
       cout << a[9] << endl << a[8] << endl << a[7] << endl;?¬
   ?¬
       return 0;?¬
   }?¬

C++: #include<iostream>
#include<vector>
#include<functional>
using namespace std;
int main(){
	vector<int> height(10);
	for(int i=0; i<10; i++){
		cin >>height[i];
	}
	sort(height.begin(),height.end(),greater<int>());
	cout <<height[0]<<endl<<height[1]<<endl<<height[2]<<endl;
	return 0;
}

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

int main() {
	int f=0,s=0,t=0,tmp;
	while(cin>>tmp, tmp!=EOF){
		if(f<tmp){f=tmp;}
		else if(s<tmp){s=tmp;}
		else if(t<tmp){t=tmp;}
	}
	cout<<f<<endl;
	cout<<s<<endl;
	cout<<t<<endl;
	return 0;
}

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

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

C++: #include<stdio.h>

int main(void)
{
	int i,j,wk;	
	int data[10];
	
	for(i=0;i<10;i++){
		scanf("%d",&data[i]);
	}
	for(i=0;i<9;i++){
		for(j=i+1;j<9;j++){
			if(data[i]<data[j]){
				wk=data[i];
				data[i]=data[j];
				data[j]=wk;
			}
		}
	}
	printf("%d\n",data[0]);
	printf("%d\n",data[1]);
	printf("%d\n",data[2]);

	return 0;
}

C++: #include<stdio.h>
#include<string.h>
#include<math.h>
#include <bits/stdc++.h>

using namespace std;

int main ()
{
    int a[9],i;

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

    int n= sizeof(a)/sizeof(a[0]);

    sort(a,a+n);

    for(i=8;i>5;--i)
    {
        printf("%d\n",a[i]);
    }
    return 0;
}

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

using _i64 = int64_t;
using _u64 = uint64_t;
using _f64 = double;

#define _for(i, start, end) for(_i64 i = (_i64)start; i < (_i64)end; ++i)
#define _rep(i, number) _for(i, 0, number)
#define _foreach(e, data) for(auto& e : data)
#define _all(data) data.begin(), data.end()

template<typename type>
_i64 _size(const type& data) { return static_cast<_i64>(data.size()); }
template<typename type, size_t size>
_i64 _size(const type (&)[size]) { return static_cast<_i64>(size); }

enum _flag : bool { able = true, disable = false };

struct _time {
    _time(_flag flag) { check = flag; if(!check) { return; } gettime(start); }
    ~_time() {
        if(!check) { return; }; gettime(end);
        _i64 elapse = chrono::duration_cast<chrono::milliseconds>(end - start).count();
        cout << endl << "Time: " << elapse << " ms" << endl;
    }
    private:
    using _timer = chrono::time_point<chrono::system_clock>;
    _timer start, end; bool check;
    void gettime(_timer& time) { time = chrono::system_clock::now(); }
};

struct _ini { _ini() { ios::sync_with_stdio(false); cin.tie(nullptr); } } _ini;

int main() {
    {
        _time time(disable);
        vector<_i64> mountain(10);
        _foreach(e, mountain) { cin >> e; }
        sort(_all(mountain), greater<_i64>());
        _rep(i, 3) { cout << mountain[i] << endl; }
    }
    return 0;
}

C++: #include<bits/stdc++.h>
/*#include<iostream>
#include<stdio.h>
#include<ctype.h>
#include<string.h>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<climits>*/
#define rep(i,a,b) for(int i=a;i<(b);++i)
#define rep1(i,a,b) for(int i=a;i<=(b);++i)
#define per(i,a,b) for(int i=a;i>(b);--i)
#define per1(i,a,b) for(int i=a;i>=(b);--i)
#define LL long long
#define inf 0x7f7f7f7f
#define N 10010
using namespace std;
int a[N];
bool cmp(int a,int b)
{
	return a>b;
}
int main()
{
	int i=0;
	while(~scanf("%d",&a[i++]));
	sort(a,a+i-1,cmp);
	printf("%d\n%d\n%d",a[0],a[1],a[2]);
}

C++: #include<iostream>
 using namespace std;
int main(){
int input[10];
int first;
int second;
int third;
int i=0;
for(;i<10;i++){
cin>>input[i];
if(first<input[i]){first = input[i];}else 
if(second<input[i]){second = input[i];}else 
if(third<input[i]){third = input[i];}
}
cout<<first<<endl;cout<<second<<endl;cout<<third<<endl;
return 0;

}

C++: #include<stdio.h>
int main(void){
	int i,j,a=0,b=0,c=0,yama;
	
	for(i=0;i<=9;i++){
		scanf("%d",&yama);
		
		if(a<yama){
			
			b=a;
			a=yama;
			
		}else if(b<yama){
			
			c=b;
			b=yama;
			
		}else if(c<yama){
			
			c=yama;
			
		}
	}
	
	printf("%d\n%d\n%d\n",a,b,c);
	
	return 0;
}

C++: #include <iostream>

void swap(int *a, int *b);

int main(void)
{
int b[3]={0,0,0};
int i=0;
for(; i < 10; i++){
int s;
scanf("%d",&s);
if(b[2] < s){b[2]=s);}
if(b[1] < b[2]){swap(&b[1],&b[2]);}
if(b[0] < b[1]){swap(&b[0],&b[1]);}
}
std::cout << b[0] << std::endl << b[1] << std::endl << b[2] << std::endl;
return 0;
}

void swap(int *a, int *b){
int c=*a;
*a=*b;*b=c;
return;
}

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

int main(void)
{
	std::priority_queue<int> height_array;
	int height;
	
	for(int i=0; i<10; i++){
		std::cin >> height;
		height_array.push(height);
	}
	
	for(int i=0; i<3; i++){
		std::cout << height_array.top() << std::endl;
		height_array.pop();
	}
	
	
	return 0;
	
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;
int main(void){
int a[10];
int i;
for(i=0;i<10;i++){
scanf("%d",&(a[i]));
}
sort(a,a+10);
for(i=0;i<3;i++){
printf("%d\n",a[i]);
}
return 0;
}

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

int main() {
	multiset<int, greater<int>> st; int temp;
	for (int i = 0; i < 10; i++) { cin >> temp; st.insert(temp); }
	auto itr = st.begin();
	for (int i = 0; i < 3; i++) { cout << *itr << endl; ++itr; }
	return 0;
}