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 <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdio>
#include <string>
#include <sstream>

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define repn(i, n) for(int i = 1; i <= (int)n; ++i)
#define pb push_back
#define lb lower_bound
#define mp make_pair
#define ite iterator
#define max2(x, y) ((x) > (y)) ? (x) : (y)
#define max3(x,y,z) max2((x), max2((y),(z)))
#define max4(v,w,x,y) max2(max2((v),(w)), max2((x),(y)))
#define min2(x, y) ((x) > (y)) ? (y) : (x)
#define min3(x,y,z) min2((x), min2((y),(z)))
#define min4(v,w,x,y) min2(min2((v),(w)), min2((x),(y)))
#define ul unsigned long
#define ull unsigned long long
#define INF 1000000007
#define MOD 1000000007
#define fs first
#define sd second

template<typename T>
bool elem(set<T> st, T val){
	return (st.find(val) != st.end());
}

template<typename T>
void printv(vector<T> vt){
    rep(i, vt.size() - 1)
        cout << vt[i] << " ";
    cout << vt[vt.size() - 1] << endl;
}

typedef vector<int> vint;
typedef vector<ul> vul;
typedef vector<ull> vull;
typedef pair<int, int> pii;

int main(void){
    vint a;
    int d;
    while(cin >> d) a.pb(d);
    sort(a.begin(), a.end());
    rep(i, 3)
        cout << a[i] << endl;
    return 0;
}

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

int main()
{
	std::array<int,10> mh;
	for (int &el : mh){
		std::cin >> el;
	}
	std::sort(mh.begin(), mh.end());

	std::cout << *(mh.end() -1) << std::endl;
	std::cout << *(mh.end() - 2) << std::endl;
	std::cout << *(mh.end() - 3) << std::endl;

}

C++: #include <stdio.h>

int main(){
	int height[10], rank[3] = {0};
	int i;
	
	for(i = 0; i < 10; i++){
    	scanf("%d", height[i]);

        if (rank[0] < height[i]){
        	rank[2] = rank[1];
        	rank[1] = rank[0];
        	rank[0] = height[i];
        }else if (rank[1] < height[i]){
        	rank[2] = rank[1];
        	rank[1] = height[i];
        }else if (rank[2] < height[i]){
        	rank[2] = height[i];
        }
    }

    for(i = 0; i < 3; i++){
    	printf("%d\n", rank[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);
  for(int i=9;i>6;i--){
    cout<<a[i]<<endl;
  }
}

C++: #include<iostream>
int main(){
	int high[10],n=0;
	for(int a=0;a<10;++a)std::cin>>high[a];
	for(int a=0;a<10;++a)
		for(int b=0;b<10;++b)
			if(high[a]>high[b])n=high[a],high[a]=high[b],high[b]=n;
	for(int a=0;a<3;++a)std::cout<<high[a]<<std::endl;
	return 0;
}

C++: a

C++: #include<algorithm>
#include<iostream>
using namespace std;
int main(){
    int x[10];
    for(int i=0;i<10;++i) cin>>x[i];
    sort(x,x+10,greater<>());
    for(int i=0;i<3;++i) cout<<x[i]<<endl;
}

C++: // Undone
#include <bits/stdc++.h>
#define int long long
#define double long double
#define INF 1e18
using namespace std;
signed main() {
  int N = 10;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin>>A[i];
  }
  sort(A.begin(), A.end(), greater<int>());
  for (int i = 0; i < 3; i++) {
    cout<<A[i]<<endl;
  }
}

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

int main() {
  vector<int> a(10); for (int i = 0; i < 10; ++i) cin >> a[i];
  sort(begin(a), end(a), greater<int>());
  for (int i = 0; i < 3; ++i) cout << a[i] << endl;
  return 0;
}

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

int main(){
	int top[3]={0,0,0},cur;
	for (int i = 0; i < 10; i++)
	{
		cin>>cur;
		if(cur>top[0]){
			top[2]=top[1];
			top[1]=top[0];
			top[0]=cur;
		}else if(cur>top[1]){
			top[2]=top[1];
			top[1]=cur;
		}else if(cur>top[3]){
			top[2]=cur;
		}
	}
	cout<<top[0]<<endl;
	cout<<top[1]<<endl;
	cout<<top[2]<<endl;
	return 0;
}

C++: /** || By The Name of Allah, Who Created Me. || **/

/**
	* Author   : Farid ul Islam Chy.
	* ID       : 1512020238.
	* Batch    : 38th.
	* Semester : 4C(E).
	* Team     : LU_AntiVirus.

	* Leading University, Sylhet.
**/

#include <map>
#include <set>
#include <stack>
#include <queue>
#include <math.h>
#include <cstdio>
#include <vector>
#include <cstring>
#include <utility>
#include <ctype.h>
#include <iomanip>
#include <iterator>
#include <iostream>
#include <algorithm>
#include <sstream>
#include <stdlib.h>
#include <fstream>

using namespace std;

#define ll    		    long long int
#define SS		    stringstream
#define pb    		    push_back
#define ull    		    unsigned long long int
#define MII        	    map <int,int>
#define MSI        	    map <string,int>
#define MIS        	    map <int,string>
#define MLI         	    map <long long int,int>
#define MIL        	    map <int,long long int>
#define MLL        	    map <ll,ll>
#define VS        	    vector <string>
#define VI        	    vector <ll>
#define VC        	    vector <char>
#define ForA(n)  	    for (int i=0; i<n; i++)
#define ForA2(n)  	    for (int j=0; j<n; j++)
#define ForA3(n)  	    for (int k=0; k<n; k++)
#define ForAS(n)  	    for (int i=n; i>0; i--)
#define ForN(n)  	    for (int i=1; i<=n; i++)
#define ForN2(n)  	    for (int j=1; j<=n; j++)
#define ForN3(n)  	    for (int k=1; k<=n; k++)
#define ForD(m,n)  	    for (int i=m; i<=n; i++)
#define ForD2(m,n)  	    for (int j=m; j<=n; j++)
#define ForD3(m,n) 	    for (int k=m; k<=n; k++)
#define SortA(n,x) 	    sort(n,n+x)
#define SortS(s)  	    sort(s.begin(), s.end())
#define SortRS(s)  	    sort(s.rbegin(), s.rend())
#define Search(s)           s.begin(), s.end()
#define SortSG(n)	    sort(n.begin(), n.end(), greater<int>())
#define Cin(a)		    cin>>a
#define GCin(a)		    getline(cin,a)
#define Cin2(a,b)	    cin>>a>>b
#define Cin3(a,b,c)	    cin>>a>>b>>c
#define Cin4(a,b,c,d)	    cin>>a>>b>>c>>d
#define PI 		    3.1415926535897932384626433832795l
#define Ignore		    cin.ignore()

int isprime(ll n){
     ll i;
     if(n==2) return 1;
     if(n%2==0) return 0;
     for(i=3;i<=sqrt(n);i+=2)
         if(n%i==0) return 0;
     return 1;
}

bool cmp(string i,string j){
    return i+j<j+i;
}

string ConvertItoS(ll n){
    SS a; a<<n;
    return a.str();
}

//ll ConvertStoI(string s){
//   return stoi(s);
//}

int main(){
    //freopen("in.txt","r",stdin)
    //freopen("out.txt","w",stdout)
    //cout<<fixed<<setprecision(2);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

	VI(v);
	ll m;

	ForA(10){
	    Cin(m);
	    v.pb(m);
	}
	SortS(v);
	ll len=v.size();
	cout<<v[len-1]<<endl;
	cout<<v[len-2]<<endl;
	cout<<v[len-3]<<endl;
	
    return 0;
}

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

C++: #include<iostream>
#include<string>
#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[10]<<endl;
    cout<<a[9]<<endl;
  cout<<a[8]<<endl;
  return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int height;
	int high[3] = {0, 0, 0};
	for(int i=0;i<10;++i){
		cin >> height;
		if(height > high[0]){
			high[2] = high[1];
			high[1] = high[0];
			high[0] = height;
		}
		else if(height > high[1]){
			high[2] = high[1];
			high[1] = height;
		}
		else if(height > high[2]){
			high[2] = height;
		}
	}
	for(int i=0;i<3;++i){
		cout << high[i] << endl;
	}
	return 0;
}