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 <bits/stdc++.h>

using namespace std;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
template<class T> inline T sqr(T x) {return x*x;}

typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;

#define all(a)  (a).begin(),(a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define pb push_back
#define mp make_pair
#define each(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define exist(s,e) ((s).find(e)!=(s).end())
#define range(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  range(i,0,n)
#define clr(a,b) memset((a), (b) ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const double eps = 1e-10;
const double pi  = acos(-1.0);
const ll INF =1LL << 62;
const int inf =1 << 24;

int main(void){
    vi a(10);

    for(auto && aa : a){
        cin >> aa;
    }

    sort(all(a), greater<int>());

    rep(i, 3) cout << a[i] << endl;

	return 0;
}

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

int main(){

	int a[10];
	cin >> a[0] >> a[1] >> a[2] >> a[3] >> a[4] >> a[5] >> a[6] >> a[7] >> a[8] >> a[9];
	int i,j;
	int hensuu;
	for(i=0;i<10;i++){
		for(j=0;j<9;j++){
			if(a[j+1]>a[j]){
				hensuu=a[j+1];
				a[j+1]=a[j];
				a[j]=hensuu;
			}
		}
	}
	cout << a[0] << "\n" << a[1] << "\n" << a[2] << endl;

    return 0;
}

C++: #include<iostream>
int main(void){
    int h;
    int t[3] = {0, 0, 0};
    for(int i = 0; i < 10; i++){
        std::cin >> h;
        for(int i = 0; i < 3; i++){
            if(t[i] < h){
                switch(i){
                    case 0:
                        t[i+2] = t[i+1];
                        t[i+1] = t[i];
                        t[i] = h;
                        break;
                    case 1:
                        t[i+1] = t[i];
                        t[i] = h;
                        break;
                }
                break;
            }
        }
    }
    for(int i = 0; i < 3; i++){
        std::cout << t[i] << std::endl;
    }
    return 0;
}

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

int main() {
	int a[10];
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	sort(a,a+10);
	cout<<a[9]<<endl;
	cout<<a[8]<<endl;
	cout<<a[7]<<endl;
	// your code goes here
	return 0;
}

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

int main(){
  vector<int> n;
  int temp;
  while (cin >> temp) {
    n.push_back(temp);
  }
  sort(n.begin(), n.end(), greater<int>());
  for (int i = 0; i < 3; i++) {
    printf("%d\n", n[i]);
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<cmath>
#include<algorithm>
using namespace std; 
int main(){
  int a[10]={};  
  for(int i=0;i<10;i++){
    cin>>a[i];
  }
 
  sort(a,a+10);
  cout<<a[9]<<endl;
  cout<<a[8]<<endl;
  cout<<a[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(three,two);
		if(two>one)swap(one,two);
	}
	cout<<one<<endl<<two<<endl<<three;
	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int max = 0;
	int b;
	int a[10];
	for(int i = 0;i<=9;i++)
	{
		cin >> a[i];
	}
	for(int k = 1;k<=3;k++)
	{
	  for(int j = 0;j<=9;j++)
	  {
		if(a[j]>max)
		{
			max=a[j];
			b=j;
		}

	  }
	  cout << max << endl;
	  a[b] = 0;
	  max = 0;
	}
	return 0;
}

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

#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define vmax_v(ary) *max_element(all(ary))
#define vmin_v(ary) *min_element(all(ary))
#define vmax_id(ary) distance((ary).begin(),max_element(all(ary)))
#define vmin_id(ary) distance((ary).begin(),min_element(all(ary)))

using ll = int64_t;
using pll = pair<ll,ll>;
using vl = vector<ll>;

const ll INF=INT64_MAX;
const double EPS=1e-10;
const double PI=acos(-1.0);

void init(){cin.tie(0);ios::sync_with_stdio(false);}
//----------------------------------------------------

int main(){
  init();
  vl h(10);

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

  sort(all(h),[](const ll &x,const ll &y){return x>y;});

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

  return 0;
}

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

using namespace::std;

int main() {
    int array[10];

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

    sort(array,array+10);

    for(int i=9;i>6;i--)
      cout << array[i] << endl;
    return 0;
}

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

using namespace std;

int main(){

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

	for(int i=0;i<10;i++){
		higher.push_back(high[i]);
	}

	sort(higher.begin(),higher.end());

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

C++: #include<iostream>
#include<sstream>
#include<cstdio>
#include<fstream>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<deque>
#include<map>
#include<set>
#include<algorithm>
#include<string>
#include<cstdlib>
#include<cmath>
using namespace std;

int main(){
	vector<int> args;
	for(int x=0;x<10;x++){
		int j;scanf("%d",&j);args.push_back(j);
	}
	sort(args.begin(),args.end());
	for(int x=0;x<3;x++){
		printf("%d\n",args[args.size()-1-x]);
	}
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <algorithm>
#include <functional>
#include <cstring>
#include <queue>
#include <math.h>
#include <iterator>
using namespace std;

int main() {
	short mountain[10] = {0};
	for (short i = 0;i < 10;++i) {
		scanf("%d", &mountain[i]);
	}
	sort(mountain, mountain + 10,greater<short>());
	for (short i = 0;i < 3;++i) {
		printf("%d\n", mountain[i]);
	}
}

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


int main()
{
	using namespace std;

	deque<int> nums;
        int tmp = 0;
	for (int i=0; i<10; ++i){
             cin >> tmp;
             nums.push_back(tmp);
        }

	// ソート実行
	sort( nums.begin(), nums.end(), greater<int>() );

	// 結果を出力
	deque<int>::iterator it = nums.begin();
        int n=0;
	while(( it != nums.end() ) && (n<3))
	{
		cout << *it << endl;
		++it;
                ++n;
	}

	return 0;
}

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

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

	int a[10];
	for (int i = 0; i < 10; i++) {
		cin >> a[i];
	}
	sort(a, a + 10);
	reverse(a, a + 10);
	for (int i = 0; i < 3; i++) {
		cout << a[i] << endl;
	}
}

C++: #include<iostream>
using namespace std;
void sort(int[]);
int main()
{
	int list[10];
	for(int i=0;i<10;i++)
		cin>>list[i];
	sort(list);
	cout<<list[9]<<endl<<list[8]<<endl<<list[7]<<endl;
	return 0;
}
void sort(int list[10])
{
	for(int i=0;i<10;i++)
	{
		for(int j=0;j<9;j++)
			if(list[j+1]<list[j])
			{
				int temp=list[j];
				list[j]=list[j+1];
				list[j+1]=temp;
			}
	}
}