Go: package main

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

func main() {
	mountHeightList := make([]int64, 10)
	scanner := bufio.NewScanner(os.Stdin)
	for i := 0; i < 10; i++ {
		scanner.Scan()
		mountHeightList[i], _ = strconv.ParseInt(scanner.Text(), 10, 64)
	}

	sort.Slice(mountHeightList, func(i, j int) bool { return mountHeightList[i] > mountHeightList[j] })

	for i := 0; i < 3; i++ {
		fmt.Printf("%d\n", mountHeightList[i])
	}
}

C++: #include <iostream>

using namespace std;


int main(){
    
//		Scanner input = new Scanner(System.in);
		
		int temp;
		
//		int[] h = new int[10];
	
        int h[10];
        	
		for (int i=0;i<10;i++){
			cout<< "height of mountain " << (i+1) << ": " <<endl ;
			cin>>h[i];
            
         
		}
					for (int j=9;j>0;j--){
					for(int i=0;i<j;i++ )
					if (h[i]<h[i+1]){
						
						temp=h[i+1];
						
						h[i+1]=h[i];
						
						h[i]=temp;}
				}
				
				
                cout<< "heights of the 1st mountain is :" << h[0]<<endl;
                cout<< "heights of the 2nd mountain is :" << h[1]<<endl;
                cout<< "heights of the 3rd mountain is :" << h[2]<<endl;
					

					return 0;
					
                }

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

int main(void){
    int i;
    vector<int> v;
    while(getline(cin, num)){
        v.push_back(num);
    }
    sort(v.begin(), v.end());
    for(int i = 1; i < 4; i++){
        cout << v[v.size - i] << endl;
    }
}

C++: #include <stdio.h>

const int tall[10] = {
	1819,
	2003,
	876,
	2840,
	1723,
	1673,
	3776,
	2848,
	1592,
	922
};

int main(void)
{
	int sort[3] = {0, 0, 0};
	int i;
	
	for(i = 0; i < 10; i++){
		if(tall[i] > sort[0]){
			sort[2] = sort[1];
			sort[1] = sort[0];
			sort[0] = tall[i];
		}
		else if(tall[i] > sort[1]){
			sort[2] = sort[1];
			sort[1] = tall[i];
		}
		else if(tall[i] > sort[2]){
			sort[2] = tall[i];
		}
	}
	printf("%d\n%d\n%d\n", sort[0], sort[1], sort[2]);
	
	return 0;
	
}

C++: #include <bits/stdc++.h>
#define INT(name) int name; scanf("%d",&name);
#define VINT(name,n) vector<int> name(n); for(int i = 0;i < n;i++) scanf("%d",&name[i]);

using namespace std;

int main(int argc, char const *argv[]){
	VINT(height,10)
	sort(height.begin(),height.end(),greater<int>());
	for(int i = 0;i < 3;i++){
		printf("%d\n",height[i]);
	}
	return 0;
}

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

C++: #include <iostream>

using namespace std;

int main(){
    int a[10],i,j,n;
    for(i=0;i<10;i++){
        std::cin>>a[i];
    }for(i=0;i<9;i++){
        for(j=i+1;j<10;j++){
           if(a[i]<a[j]){
              n=a[i];
              a[i]=a[j];
              a[j]=n;
           }
        }
     }
   cout<<a[0]<<endl<<a[1]<<endl<<a[2]<<endl;
                                                  
return 0;
}

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


int main(void){

	int a[11],i,max1,max2,max3;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}


	max1 = 0;
	max2 = 0;
	max3 = 0;

	for (i=1; i<11; ++i){
		if (a[max1] < a[i]){max1 = i;}
	}
		for (i=1;i<11;++i){
			if (a[i] < a[max1]){
				if (a[max2] < a[i]){max2 = i;}
		}
		}
			for (i=1;i<11;++i){
			if (a[i] < a[max2]){
				if (a[max3] < a[i]){max3 = i;}
		}
			}

		cout << a[max1] << endl;
		cout << a[max2] << endl;
		cout << a[max3] << endl;
		

		return 0;
	}

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

int main(){
  int Mt[10];
  int s;
  int i, j;
  for (i = 0; i <= 9; i++){
    cin >> Mt[i];
  }

  for (i = 1; i <= 3; i++){
    for (j = 8; j >= 0; j--){
      if (Mt[j] <= Mt[j + 1]){
        s = Mt[j];
        Mt[j] = Mt[j + 1];
        Mt[j + 1] = s;
      }
    }
  }

  for (i = 0; i <= 2; i++){
    cout << Mt[i] << "\n";
  }
  return (0);
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
template<typename V> constexpr typename V::value_type sum(const V &v) { return accumulate(all(v), 0); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  while (1) {}
}

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

int main(void) 
{
	int n;
	vector<int> h;
	for (int i = 0; i < 10; i++)
	{
		cin >> n;
		h.push_back(n);
	}
	sort(h.begin(), h.end());
	for (int i = 9; i >= 7; i--)
	{
		cout << h.at(i) << endl;
	}

	return 0;
}

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

using namespace std;

int main() {
  vector<int> mountains;
  for (int i = 0; i < 10; i++) {
    int mountain;
    scanf("%d", &mountain);
    mountains.push_back(mountain);
  }
  sort(mountains.begin(), mountains.end(), greater<int>());
  for (int i = 0; i < 3; i++) {
    printf("%d", mountains[0]);
    mountains.erase(mountains.begin());
  }
}

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

int main(){
    std::set<int> s = {1819, 2003, 876, 2840, 1723, 1673, 3776, 2848, 1592, 922};
    auto itr = s.end();
    for(int i = 0; i < 3; ++i) {
        --itr;
        std::cout << *itr << std::endl;
    }
    return 0;
}

C++: #include<stdio.h>
#include<algorithm>
main(){int a[10],i;for(i=0;i<10;)scanf("%d",&a[i++]);std::sort(a,a+10);for(i=0;i<3;)printf("%d\n",a[9-i++]);}

C++: #include<stdio.h>
int main()
{
int ara[11];
int i,j,t;
for(i=0;i<10;i++){
scanf("%d",&ara[i]);
}
for(i=0;i<10;i++){
for(j=i+1;j<10;j++){
  if(ara[i]>ara[j]){
  t=ara[i];
  ara[i]=ara[j];
  ara[j]=t;
    }
  }
 }

 for(i=9;i>6;i--){
 printf("%d\n",ara[i]);
 }
 return 0;

}

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

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

C++: #include<iostream>
using namespace std;
int main()
{
	int b[10];
	for(int i=0;i<10;i++)
		cin>>b[i];
	int t;
	for(i=0;i<3;i++)
	{
		for(int j=0;j+i<9;j++)
			while(b[j]>b[j+1])
			{	t=b[j];b[j]=b[j+1];b[j+1]=t;}
		cout<<b[j]<<endl;
	}
	return 0;
}