Go: package main

import (
	"fmt"
	"sort"
)

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

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

	sort.Sort(sort.Reverse(sort.IntSlice(mountains)))

	for i := 0; i < 3; i++ {
		fmt.Println(mountains[i])
	}
}

C++: #include<iostream>
using namespace std;
int main(){
  int a=-1,b=-1,c=-1,d;
  for(int i=0;i<10;i++){
    cin>>d;
    if(d>a){
      c=b;
      b=a;
      a=d;
    }else if(d>b){
      c=b;
      b=d;
    }else if(d>c){
      c=d;
    }
  }
  cout<<a<<endl<<b<<endl<<c<<endl;
  return(0);
}

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

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

C++: #include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <climits>
#include <cfloat>
using namespace std;

int main()
{
    vector<int> a(10);
    for(int i=0; i<10; ++i)
        cin >> a[i];
    sort(a.rbegin(), a.rend());
    for(int i=0; i<3; ++i)
        cout << a[i] << endl;
}

C++: lis=[];

for i in range(10):
    h=int(input());
    lis.append(h);
    
for i in range(10):
    for j in range(i+1,10):
        if lis[i]<lis[j]:
            a=lis[i];
            lis[i]=lis[j];
            lis[j]=a;
            
for i in range(3):
    print(lis[i]);

C++: #include <cstdio>
#include <set>

int main(){
  using namespace std;
  set<int, greater<int> > mts{};
  for(int i = 0; i < 10; i++){
    int tmp = 0;
    scanf("%d", &tmp);
    mts.insert(tmp);
  }
  int count = 0;
  for(int const mt : mts){
    printf("%d\n", mt);
    if(++count >= 3) break;
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstring>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define rp(a) while(a--)
#define pb push_back
#define mp make_pair
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double EPS=1e-10;
using namespace std;
typedef long long ll;
typedef vector<int> vi;
bool h[1000010]={false};
int main(){
	vector<int>in(10);
	rep(i,10)cin>>in[i];
	sort(all(in));
	cout<<in[9]<<endl;
	cout<<in[8]<<endl;
	cout<<in[7]<<endl;
	
}

C++: #include <cstdio>
int main(){
 int top3[3];
 int i,tmp,data;
 for(i=0;i<3;i++) top3[i]=0;
 for(i=0;i<10;i++){
  scanf("%d",&data);
  if (top3[2]>data) {} 
  else {
   top3[2]=data;
   if (top3[1]>data) {} 
   else {
    top3[2]=top3[1];
    if (top3[0]>data) top3[1]=data;
    else {
     top3[1]=top3[0];
     top3[0]=data;
    };
   };
  };
 };
 for(i=0;i<3;i++)
    printf("%d\n",top3[i]);
 return 0;
};

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

using namespace std;

int main() {
	vector<int> heights;
	int meter;

	for(int index = 0; index < 10; ++index) {
		cin >> meter;
		heights.push_back(meter);
	}
	
	reverse(heights.begin(), heights.end());
	
	cout << heights[0] << endl;
	cout << heights[1] << endl;
	cout << heights[2] << endl;
	
	return 0;
}

C++: #include <stdio.h>
#include <vector>
#include <algorithm>

int main()
{
  std::vector<int> hills(10);
  for (int i = 0; i < 10; i++) {
    int temp;
    scanf("%d", &temp);
    hills[i] = temp;
  }
  std::sort(hills.begin(), hills.end());
  std::reverse(hills.begin(), hills.end());
  for (int i = 0; i < 3; i++) {
    printf("%d\n", hills[i]);
  }
  return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int mountain[10];
	int a, b, c;

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

	a = mountain[0];
	b = mountain[1];
	c = mountain[2];

	for (int y = 3; y <= 9; y++) {
		if (a <= b) {
			if (a <= c) {
				if (a < mountain[y]) {
					a = mountain[y];
				}
			}
			else {
				if (c < mountain[y]) {
					c = mountain[y];
				}
			}
		}
		else if (b <= c)
		{
			if (b < mountain[y]) {
				b = mountain[y];
			}
		}
	}
	if (a <= b) {
		if (a <= c) {
			if (b <= c) {
				cout << c << "\n" << b << "\n" << a << "\n";
			}
			else {
				cout << b << "\n" << c << "\n" << a << "\n";
			}
		}
		else cout << b << "\n" << a << "\n" << c << "\n";
	}
	else if (a <= c) {
		cout << c << "\n" << a << "\n" << b << "\n";
	}
	else if (b <= c) {
		cout << a << "\n" << c << "\n" << b << "\n";
	}
	else cout << a << "\n" << b << "\n" << c << "\n";

	char a____;
	cin >> a____;

	return 0;
}

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

C++: 
#include <stdio.h>
const int N = 15;
int main() {
    int a[N] = {0};
    int i, j, tmp;
    for(i = 0; i < 10; i++)
    {
        scanf("%d", &a[i]);
    }
    for(i = 0; i < 10; i++)
    {
        for(j = i; j < 10; j++)
        {
            if(a[i] < a[j])
            {
                tmp = a[i];
                a[i] = a[j];
                a[j] = tmp;
            }
        }
    }
    printf("%d\n%d\n%d\n", a[0], a[1], a[2]);
    return 0;
}

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

int main()
{
	int a[s];
	for (int i = 0; i < s; i++)
	{
		cin>>a[i];
	}
	for (int i = 0; i < s; i++)
	{
		for (int j = i+1; j <= s; j++)
		{
			if(i==3)
				break;
			if(a[i]<a[j])
			{
				int temp=a[i];
				a[i]=a[j];
				a[j]=temp;
			}
		}
	}
	for (int i = 0; i < 3; i++)
	{
		cout<<a[i]<<endl;
	}
	
	return 0;
}

C++: #include <cmath>
#include <ctime>
#include <algorithm>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <string>
#include <vector>
#include <list>
#include <deque>
#include <stack>
#include <bitset>
#include <functional>
#include <numeric>
#include <utility>
#include <iomanip>
#include <cstdio>
#include <cctype>
#include <queue>
#include <complex>
#include <climits>

typedef long long ll;

using namespace std;

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

	sort(h, h+10, greater<int>());

	cout << h[0] << endl << h[1] << endl << h[2];
	while(1);
	

	return 0;
}

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

int main(){
    int mountain[10];
    
    for(int i=0;i<10;i++)
        //scanf("%d",&mountain[i]);
	cin>>mountain[i];
    for(int i=1;i<9;i++){
        for(int j=0;j<=i;j++){
	    if(mountain[j]<mountain[j+1]){
                int temp;
		temp = mountain[j];
		mountain[j] = mountain[j+1];
		mountain[j+1] = mountain[j];
	    }
	}
    }

    //結果出力
    for(int i=0;i<3;i++)
         cout<<mountain[i]<<'\n';
    return 0;
}

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

using namespace std;

int main()
{
	vector<int> arr(10);
	
	for(int i = 0; i < 10; i++){
		cin >> arr[i];
	}
	
	sort(arr.begin(),arr.end());
	
	printf("%d\n%d\n%d\n",arr[10],arr[9],arr[8]);
	
	return 0;
}

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

int main(){
	int suchi,high=0,middle=0,low=0,i,flag=0,a,b,c;
	
	for(i=0;i<10;i++){
		cin>>suchi;
			
		if(flag==0){
			low=suchi;
			middle = suchi;
			high = suchi;
			flag++;
			}
			
		else{
			if(suchi>low&&suchi<middle)
				low = suchi;
			
			else if(suchi>middle&&suchi<high){
				low = middle;
				middle = suchi;
			}
			
			else if(suchi>high){
				low = middle;
				middle = high;
				high = suchi;
			}
				
			}
	}
	
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low;
	
	return 0;
}

C++: #include<iostream>

using namespace std;

int main(void){
  int a[10],b[3]={0}, c, d, i;
  for(i = 0;i<10;i++){
    cin >> a[i];
  }
  i=0;
  for(c=0;c<3;c++){
  for(i=0;i<10;i++){
    if(a[i] > b[c]){
      b[c] = a[i];
      d=i;
    }
  }
  a[d] = 0;
  }
  i=0;
  for(i=0;i<3;i++) cout << b[i] << endl;
}