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 <bits/stdc++.h>
#define SORT(a) sort(a.begin(), a.end())
#define RSORT(a) sort(a.rbegin(), a.rend())
#define REP(i, n) for (int i = 0; i < n; i++)
#define RREP(i, n) for (int i = n - 1; 0 <= i; i--)
#define FOR(i, start, end) for (int i = start; i < end; i++)
#define RFOR(i, start, end) for (int i = start - 1; 0 <= i; i--)
#define ALL(a) a.begin(), a.end()
using ll = long long;
using namespace std;
constexpr int INF32       = 1'050'000'000;
constexpr long long INF64 = 4'000'000'000'000'000'000;
constexpr int MOD7        = 1'000'000'007;
constexpr int MOD9        = 1'000'000'009;
template <class T> inline bool chmin(T &a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template <class T> inline bool chmax(T &a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
void print() { std::cout << '\n'; }
template <class H, class... T> void print(H &&head, T &&... args) {
    std::cout << head;
    sizeof...(args) == 0 ? std::cout << "" : std::cout << ' ';
    print(std::forward<T>(args)...);
}
template <class T> void print(std::vector<T> &v) {
    for (int i = 0; i < v.size(); i++) {
        std::cout << v[i];
        i == v.size() - 1 ? std::cout << '\n' : std::cout << ' ';
    }
}
template <class T> void print(std::vector<std::vector<T>> &v) {
    for (int i = 0; i < v.size(); i++) {
        for (int j = 0; j < v[i].size(); j++) {
            std::cout << v[i][j];
            j == v[i].size() - 1 ? std::cout << '\n' : std::cout << ' ';
        }
    }
}
void scan() {}
template <class H, class... T> void scan(H &&head, T &&... args) {
    std::cin >> head;
    scan(std::forward<T>(args)...);
}
template <class T> void scan(std::vector<T> &v) {
    for (auto &&i : v) {
        scan(i);
    }
}

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    vector<int> v(10);
    scan(v);
    RSORT(v);
    REP(i, 3) print(v[i]);

    return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
 vector<int> h(10);
 rep(i,10) cin >> h[i];
 sort(h.rbegin(),h.rend());
 rep(i,3) cout << h[i] << endl;
 return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
#define SIZE_OF_ARRAY(array) (sizeof(array)/sizeof(array[0]))
int main(){
	int high[10] = {};
	for(int i=0; i<10; i++){
		cin >> high[i];
	}

	sort(high, high + SIZE_OF_ARRAY(high), greater<int>());

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

C++: #include <stdio.h>

int main(){
	int a,b[3]={0,0,0};
	for(int i=0;i<10;i++){
		scanf("%d",&a);
		if(a>=b[2]){
			if(a>=b[1]){
				if(a>=b[0]){
					b[2]=b[1];
					b[1]=b[0];
					b[0]=a;
				}else{
					b[2]=b[1];
					b[1]=a;
				}
			}else{
				b[2]=a;
			}
		}
	}
	for(int i=0;i<3;i++){
		printf("%d\n",b[i]);
	}
}

C++: #include <iostream>
#include <ctime>
#include <cstdlib>
using namespace std;
int main(){
    int a[10];
    for(int i=0; i<10; i++){
        cout<<"Height of mountain "<<i+1<<" ";
        cin>>a[i];
        cout<<endl;
    }
    for(int i=0; i<10; i++)
        for(int j=0; j<9-i; j++)
            if(a[j]<a[j+1])
                swap(a[j],a[j+1]);
     for(int i=0; i<3; i++)
             cout<<a[i]<<endl;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <cmath>
#include <queue>
#include <map>
#include <stack>
#include <list>
#include <vector>
using namespace std;
int Max1=-1;
int Max2=-1;
int Max3=-1;
int main()
{
	int n;
	while(scanf("%d",&n)!=EOF)
	{
		if(n>Max1)
		{
			Max3=Max2;
			Max2=Max1;
			Max1=n;
			continue;
		}
		if(n>Max2)
		{
			Max3=Max2;
			Max2=n;
			continue;
		}
		if(n>Max3)
		{
			Max3=n;
			continue;
		}
	}
	cout<<Max1<<endl<<Max2<<endl<<Max3<<endl;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int yama[9];
	int x,y,z.a;
	for(x=0; x<10; x++) {
		cin >> yama[x];
	}
	for(y=0;y<10000; y++) {
		if(yama[y] > yama[y+1]) {
			z = yama[y];
			yama[y] = yama[y+1];
			yama[y+1] = z;
		}
		else {
			a++;
		}
		if(y == 8) {
			if(a == 9) {
				break;
			}
			else {
				y = 0;
				a = 0;
			}
		}
	}
	cout << yama[9] << endl;
	cout << yama[8] << endl;
	cout << yama[7] << endl;
	return 0;
}

C++: #include <iostream>

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

C++: #include<stdio.h>
int main(void) {
	int a, b, c[12],top=0,second=0,thread=0;
	for (int i = 1; i <= 10; i++)
	{
		scanf("%d", &c[i]);
		if (c[i]>=top)
		{
			if (c[i] == top)continue;
			second = top;
			top = c[i];
		}
		else
		{
			if (c[i]>=second)
			{
				if (c[i] == second)continue;
				thread = second;
				second = c[i];
			}
			else
			{
				if (c[i]>thread)
				{
					thread = c[i];
				}
			}
		}
	}
	printf("%d\n%d\n%d\n", top, second, thread);
	return 0;
}

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

int main(){
	priority_queue<int> qu;

	for(int i = 0; i < 10; i ++)
	{
		int t;
		cin>>t;

		qu.push(t);
	}

	for(int i = 0; i < 3; i ++)
	{
		cout<<qu.top()<<endl;
		qu.pop();
	}

    return 0;
}

C++: #include<stdio.h>
    
int main(void){
    
    /* 宣言と初期化 */
    int hai[10];
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
    
for(i=0;i<10;i++)
{
scanf("%d",&hai[i]);
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0];
    
    /* 計算 */
    for(i=0;i<10;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
       { tempmax=hai[i];
　　    hai[i]=0;}
    }
    
    for(i=0;i<10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd)
        {temp2nd=hai[i];hai[i]=0}
    }
    
    for(i=0;i<10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd)
        {temp3rd=hai[i];hai[i]=0}
    }
    
    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);
    
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int mountain[10];
  for(int i=0;i<10;i++)cin>>mountain[i];
  sort(mountain,mountain+10);
  for(int i=9;i>=7;i--)cout<<mountain[i]<<endl;
  return 0;
}

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

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

int main(){
  int i,x;
  std::vector<int>v;
  for(i=0;i<10;i++)scanf("%d",&x),v.push_back(x);
  std::sort(v.begin(),v.end());
  printf("%d\n%d\n%d\n",v[9],v[8],v[7]);
}

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

using namespace std;

int main() {
	int mountain[10] = { 0 },i;
	for (i = 0; i < 10; i++) {
		cin >> mountain[i];
	}
	sort(mountain, mountain + 10);
	for (i = 0; i < 3; i++) {
		cout << mountain[9 - i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;
#define REP0(i,n) for(int i=0;i<n;++i)
#define REP1(i,n) for(int i=1;i<=n;++i)
#define ALL(c) (c).begin(),(c).end()
int main(){
	int a[10];
	REP0(i,10) scanf("%d",&a[i]);
	sort(a,a+10);
	printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
	return 0;
}