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>
using namespace std;

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

int main(){

	int a[11],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 = a[1];

	for (int i=2; i<11; i++){
		if (max1 < a[i]){
			swap(max1,a[i]);
		}
	}
	max2 = a[2];

	for (int i=3; i<11; i++){
		if (max2 < a[i]){
			swap(max2,a[i]);
		}
	}
	max3 = a[3];

	for (int i=4; i<11; i++){
		if (max3 < a[i]){
			swap(max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

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

#define BOGO 10

using namespace std;

int main()
{
	int arr[BOGO];
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		
		/**
		for(int j = 0; j < BOGO; j++){
			cout << arr[j] << flush;
		}
		cout << endl;
		/**/
		
		bool found = true;
		for(int j = 0; j < BOGO-1; j++){
			if(arr[j] > arr[j+1]){
				found = false;
				break;
			}
		}
		
		if(found){
			break;
		}
		random_shuffle(arr, arr+BOGO);
	}
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int data[10];

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

for(int i=0;i<3;i++)cout<<data[i]<<endl;

}

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

#define N_HILLS 10
#define N_TOP   3

using namespace std;


void input_hills(int *hills)
{
  for(int i = 0; i < N_HILLS; ++i){
    cin >> hills[i];
  }
}


void output_top_hills(int *hills)
{
  // descending order
  sort(hills, hills+N_HILLS, greater<int>());

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


int main()
{
  int hills[N_HILLS];

  input_hills(hills);
  output_top_hills(hills);

  return 0;
}

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

int a0 = 0, a1 = 0, a2 = 0, a = 0;

int main(){
    for(int i = 0; i < 10; i++){
        cin >> a;
        if(a0 <= a){
            a2 = a1;
            a1 = a0;
            a0 = a;
        }else if(a1 <= a){
            a2 = a1;
            a1 = a;
        }else if(a2 <= a){
            a2 = a;
        }
    }
    cout << a0 << endl << a1 << endl << a2 << endl;
    return 0;
}

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

int main(){
	int height[10];
	int i , j;
	for(i=0 ; i<10 ; i++){
		cin >> height[i] ;
	}
	cout << endl;
	
	for(i=9 ; i>0 ; i--){
		for(j=0 ; j<i ; j++){
			if (height[j]>=height[j+1]){
				height[j]^=height[j+1];
				height[j+1]^=height[j];
				height[j]^=height[j+1];
			}
		}
	}
	for(i=9 ; i>6 ; i--){
		cout << height[i] << endl;
	}
	return 0;
}

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

int main() {
  int a[10];
  for (auto& e : a) cin >> e;
  sort(a, a + 10);
  cout << a[9] << endl
       << a[8] << endl
       << a[7] << endl;
}

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

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

    sort(v.begin(),v.end(),greater<int>());
    


    for(int i = 0;i<3;i++)
        cout<<v.at(i);
    return 0;
}

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

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

	cout << a[0] << endl << a[1] << endl << a[2] << endl;
}

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

using namespace std;

int main(){
    vector<int> m(10);

    for(int i=0; i<10; i++){
        cin >> m[i];
    }
    sort(m.begin(), m.end());

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

    return 0;
}

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

int main(){
        int i;
        int high[10];
        for(i = 0; i < 10; i++){
                scanf("%d", &high[i]);
                getchar();
        }
        sort(high, high + 10);
        reverse(high, high + 10);
        for(i = 0; i < 3; i++){
                printf("%d", high[i]);
        }
        return 0;
}

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

int main(){
	int N[10];

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

	sort(&N[0], &N[0]+10, greater<int>());

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

	return 0;
}

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

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    vector<int> height(10);
    rep(i, 10) cin >> height[i];

    sort(ALL(height), greater<int>());

    rep(i, 3)
    {
        OP(height[i])
    }

    return 0;
}

C++: #include<iostream>

using namespace std;
int main()
{
int mount[10];
for(int i=0;i<10;i++)
{
cin >> mount[i];
}
int max[3];
max[0] = mount[0];
max[1] = mount[0];
max[2] = mount[0];
for(int i=1;i<10;i++)
{
if(mount[i]>max[0])
{
max[0] = mount[i];
}
}
for(int i=1;i<10;i++)
{
if(mount[i]>max[1]&&mount[i]!=max[0])
{
max[1] = mount[i];
}
}
for(int i=1;i<10;i++)
{
if(mount[i]>max[2]&&mount[i]!=max[0]&&mount[i]!=max[1])
{
max[2] = mount[i];
}
}
cout << max[0] << endl;
cout << max[1] << endl;
cout << max[2] <<endl;
return 0;
}

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

int main()
{
	vector<int> mt;
	for (int i = 0; i < 10; i++) {
		int tmp;
		cin >> tmp;
		mt.push_back(tmp);
	}
	sort(mt.begin(), mt.end());
	for (int i = mt.size()-1, j = 0; j < 3; i--, j++) {
		cout << mt[i] << endl;
	}

	return 0;
}

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

int main()
{
	int x[10];
	for (int i = 0; i < 10; i++)
	{
		cin >> x[i];
	}
	sort(begin(x),end(x));
	cout << x[9] << endl;
	cout << x[8] << endl;
	cout << x[7] << endl;

	return 0;
}

C++: #include <iostream>
#include<algorithm>
using namespace std;
int main() {
	int a,one=0,two=0,three=0;
	for (int i=0;i<10;i++){
		cin>>a;
		if (a>three) three=a;
		if (three>two) swap(two,three);
		if (two>one) swap(one,two);
	}
		cout<<one<<endl<<two<<endl<<three<<endl;
	return 0;
}

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

int main(){
   vector<int> v;
   v.clear();
   int a;
   
   for(int i=0; i<10; i++){
      cin >> a;
      v.push_back(a);
   }
   
   sort(v.begin(), v.end());
   
   cout << v[9] << endl; 
   cout << v[8] << endl;
   cout << v[7] << endl;
  
   return 0;
}

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

#define BOGO 10

using namespace std;

bool is_sorted(vector<int> arr, int size)
{
	bool sorted = true;
	for(int i = 0; i < size; i++){
		if(!(arr[i] <= arr[i+1])){
			sorted = false;
		}
	}
	
	return sorted;
}

int main()
{
	vector<int> arr(BOGO);
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		if(is_sorted(arr, arr.size())){
			break;
		}
		random_shuffle(arr.begin(), arr.end());
	}
	
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}