Go: package main

import "fmt"

func main() {
	var height int
	topHeights := [5]int{}

	for i := 0; i < 10; i++ {
		fmt.Scan(&height)

		for j := 0; j < 3; j++ {
			if topHeights[j] < height {
				topHeights[j+2] = topHeights[j+1]
				topHeights[j+1] = topHeights[j]
				topHeights[j] = height
				break
			}
		}
	}

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

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


int main()
{
	int i[10];
	cin >> i[1] >> i[2] >> i[3] >> i[4] >> i[5] >> i[6] >> i[7] >> i[8] >> i[9] >> i[10];
	sort(i, i+10);
	cout << i[1] << endl;
	cout << i[2] << endl;
	cout << i[3] << endl;

	return 0;
}

C++: #include <cstdio>
#include <algorithm>
  
using namespace std;
  
int main(void){
  int i,array[10];
  
  for(i=0;i<10;i++)  scanf("%d",&array[i]);
  sort(array,array+10);
  for(i=9;i>=7;i--)  printf("%d\n",array[i]);
  
  return 0;
}

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

#define N 10

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

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

int main(){

const int n = 3;
const int num = 10;
int t;

int a[num] = {0};
int b[n] = {0};
for(int i = 0; i < num; i++)
{
	cin >> a[i];
}
b[0] = a[0];
for(int i = 1; i < num; i++)
{
	t = a[i];
	for(int j = 0;j < n; j++)
	{
		if(t > b[j])
		{
			for(int k = n-1; k >= j+1; k--)
			{
			b[k] = b[k-1];
			}
		b[j] = t;
		break;
		}
	
	}

}
for(int i = 0;i < n;i++)
	cout << b[i] << "\n";
    return 0;
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
    int i,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>
#define N 10

using namespace std;

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

void bubble_sort(int mountain[N]){
	for (int i=(N-1); i>0; --i){
		for (int j=i; j>0; --j){
			if (mountain[j-1] < mountain[j]){
				swap(mountain[j-1], mountain[j]);
			}
		}
	}
}

int main(void){
	int mountain[N];
	for (int i=0; i<N; ++i){
		int tmp;
		do{
			cin >> tmp;
		}while ((tmp<0) || (10000 < tmp));
		mountain[i] = tmp;
	}
	bubble_sort(mountain);
	cout << "output" << endl;
	for (int i=0; i<3; ++i){
		cout << mountain[i] << endl;
	}
	return 0;
}

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

using namespace std;

int main() {
	
	int A[10];
	
	while( cin >> A[0] ) {
		
		for(int i=1;i<10;i++)
		cin >> A[i];
			
		sort(A,A+10);
		
		for(int i=9;i>6;i--)
		cout << A[i] << "\n";
		
	}
		
	return 0;
}

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

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

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

  sort(begin(h),end(h),greater<int>());

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

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

using namespace std;

int main()
{
    int n = 10;
    int i = 0, j = 0;
    array<int, 10> arr;
    
    for (int i = 0; i < 10; i++)
    {
        cin >> arr[i];
    }
    
    for (i = 0; i < n - 1; i++)
    {
        for (j = i + 1; j < n; j++)
        {
            if (arr[i] < arr[j])
            {
                swap(arr[i], arr[j]);
            }
        }
    }
    
    for (i = 0; i < 3; i++)
    {
        cout << arr[i] << endl;
    }
    
    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=0;i<10;i++){
        for(int j=9;j>i;j--){
	    if(mountain[j]>mountain[j-1]){
            int temp = 0;
			temp = mountain[j];
			mountain[j] = mountain[j-1];
			mountain[j-1] = temp;
	    }
	}
    }

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

C++: #include <stdio.h>

int main(void)
{
	int i,j,mt_height[10];

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

	for (i=0;i<9;i++)
	{
		for (j = 9; j >= 0; j--)
		{
			if (mt_height[j + 1] > mt_height[j])
			{
				int temp = mt_height[j+1];
				mt_height[j+1] = mt_height[j];
				mt_height[j] = temp;
			}
		}
	}

	for (i = 0; i < 3; i++)
		printf("%d\n", mt_height[i]);

	return 0;
}

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

int main() {
	vector<int> b(10);
	for (int i = 0;i < 10;i++) {
		cin >> b[i];
	}
	sort(b.begin(),b.end());
	reverse(b.begin(), b.end());
	
	for (int i = 0;i < 3;i++) {
		cout<<b.at(i)<<endl ;
	}
	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, less<int>());
	for (int i = 9; i >= 7; i--){
		cout << a[i] << endl;
	}
}

C++: #include <stdio.h>

int main(void)
{
	int i,j,tmp;
	int mts[11] = {0};

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

	for(j = 0; j < 10; j++)
	{
		for(i = 0; i < 10 - j; i++)
		{
			if(mts[i] < mts[i+1])
			{
				tmp = mts[i];
				mts[i] = mts[i+1];
				mts[i+1] = tmp;
			}
		}
	}

	printf("%d\n%d\n%d\n",mts[0],mts[1],mts[2]);

	return 0;

}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
	vector<int> vec;
	int n;
	for(int i=0;i<10;i++){
	cin>>n;
	 vec.push_back(n);
	}
	sort(vec.begin(),vec.end());
	cout<<vec[9]<<endl;
	cout<<vec[8]<<endl;
	cout<<vec[7]<<endl;
	return 0;
}

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

using namespace std;

int main(void){
  int x;
  vector<int> v;

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

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

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

  return 0;
}

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

typedef long int lint;
typedef long long int llint;
typedef pair<int, int> pii;
typedef pair<int, string> pis;
typedef pair<long, long> pll;

#define EACH(t, c) for (auto&& t : c)
#define ALL(c) begin(c), end(c)
#define FOR(i, s, e) for (int i = (s); i < (int)(e); ++i)
#define REP(i, n) FOR(i, 0, n)
#define endl '\n'
#define fk first
#define sv second

const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
const int MOD = (int)1e9 + 7;
const int INF = 999999999;

template<typename T>
void print(const std::vector<T>& v, char sep=' ') {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i != 0) cout << sep;
    cout << v[i];
  }
  cout << endl;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a[10];

  REP(i, 10) {
    cin >> a[i];
  }
  sort(a, a + 10);

  REP(i, 3) {
    cout << a[9 - i] << endl;
  }
}

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

C++: #include <iostream>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    int x;
    int a = 0; int b = 0; int c = 0;
    while (cin >> x) {
        if (x > a) {
            c = b;
            b = a;
            a = x;
        }
        else if (x > b) {
            c = b;
            b = x;
        }
        else if (x > c)
            c = x;
    }
    cout << a << "\n" << b << "\n" << c << "\n";
}

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

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

	sort (high, high+10);
	for(int i=9;i>6;i--){
		cout << high[i]<<endl;
	}
}