Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	mt := make([]int, 10)

	for i := 0; i < 10; i++ {
		fmt.Scan(&mt[i])
	}

	sort.Ints(mt)
	fmt.Printf("%d\n%d\n%d\n", mt[9], mt[8], mt[7])

}

C++: #include<iostream>
using namespace std;
int main() {
	int a[11],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<stdio.h>
#include<algorithm>
using   namespace   std;

int main()
{
    int i,j,a[10];
    for(i=0;i<10;i++)
    {
        scanf("%d",&a[i]);
    }
    sort(a,a+10);
    printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
    return 0;
}

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

int main(){
	int nyuryoku,high,low,middle,flag;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else{
				middle = nyuryoku;
			}low = nyuryoku;
		}
	}
	}
	cout<<highendl<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}

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

int main(){
  int t[10];

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

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

C++: #include <stdio.h>
int main(){

	int a[10],i,j,k;

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

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

	printf("%d%d%d",a[0],a[1],a[2]);

	return 0;
}

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

int main()
{
	int a = 0, b = 0, c = 0;
	const int BUFF_SIZE = 20;
	char buff[BUFF_SIZE];

	for (int i = 0; i < 10; i++)
	{
		 fgets(buff, BUFF_SIZE, stdin);
		int h = atoi(buff);
		
		if (h > a)
		{
			c = b;
			b = a;
			a = h;
		}
		else if (h > b)
		{
			c = b;
			b = h;
		}
		else if (h > c)
		{
			c = h;
		}
	}

	printf("%d\n%d\n%d\n", a, b, c);
	
	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
    int i[3]={0};
    for(int j=0;j<=10;++j)
    {
        int height;
        cin>>height;
        if(height>=i[2])
        {
            if(height>=i[1])
            {
                if(height>=i[0])
                {
                    i[2]=i[1];
                    i[1]=i[0];
                    i[0]=height;
                }
                else
                {
                    i[2]=i[1];
                    i[1]=height;
                }
            }
            else
            {
                i[2]=height;
            }
        }
    }
    for(int j=0;j<=2;++j)
    {
        cout<<i[j]<<endl;
    }
}

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

int main()
{
	priority_queue< int,vector<int>,less<int> > que;
	int in;

	for(int i = 0; i < 10; i++){
		cin >> in;
		que.push(in);
	}


	for(int j = 0; j < 3; j++){
		cout << que.top() << '\n';
		que.pop();
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void)
{
  int a[10],n1=0,n2=0,n3=0;
  
  for(int i=0;i<10;i++){
    cin>>a[i];
      if(a[i]>=n1){
        n3=n2;
        n2=n1;
        n1=a[i];
      }
      else if(a[i]>=n2){
        n3=n2;
        n2=a[i];
      }
      else if(a[i]>=n3){
        n3=a[i];
      }
  }
  cout<<n1<<'\n'<<n2<<'\n'<<n3<<'\n';
}

C++: #include <iostream>
#include <cstdio>
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 <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;
}