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 <string>
#include <vector>
#include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#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<<a[8]<<endl<<a[7]<<endl;
    

    return 0;
}

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

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

int a[10];

int main(){

  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>
using namespace std;
int main(){
	int t1=0,t2=0,t3=0,T=0;
	for(int i=0;i<10;i++){
		cin>>T;
		if(T>=t1){
			t3=t2;
			t2=t1;
			t1=T;
		}
		else if(T>=t2){
			t3=t2;
			t2=T;
		}
		else if(T>=t3){
			t3=T;
		}
	}
	cout<<t1<<endl<<t2<<endl<<t3<<endl;
	return 0;
}

C++:  /*
Write a program which computes the digit number of sum of two integers a and b
 */

#include <iostream>
  
using namespace std;  
  
// ??\???  
int a, b;  
  
void solve()  
{  
    int res = 0;  
  
    a += b;  
  
    for (; a; a /= 10)  
        res++;  
  
    cout << res << endl;  
}  
  
int main()  
{  
    while (cin >> a >> b)  
        solve();  
  
    return 0;  
}

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

C++: #include <iostream>
#include <stdio.h> //printf()

using namespace std;

int main(){
    int i, A[10], tmp, j;

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

    //bubble sort
    //??????????????????

    j = 3;
    while (j-- > 0) {
        for (i = 0; i < 9; i++) {
            if (A[i] > A[i+1]) {
                tmp = A[i+1];
                A[i+1] = A[i];
                A[i] = tmp;
            }
        }
    }

    printf("%d\n", A[9]);
    printf("%d\n", A[8]);
    printf("%d\n", A[7]);

    return 0;
}

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

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

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

using namespace std;

int main() {
  array<int, 10> h;
  for (int& i : h) cin >> i;
  partial_sort(h.begin(), h.begin() + 3, h.end(), greater<int>());
  for (int i = 0; i < 3; ++i) cout << h[i] << endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
typedef long long LL;
vector<LL>v;
int main(){
	REP(i,10){
	    LL a;
	    cin>>a;
	    v.push_back(a);
	}
        sort(v.begin(),v.end());
        reverse(v.begin(),v.end());
	
	REP(i,3){
           cout<<v[i]<<endl;
        }
	return(0);
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

vector<int> height;

int main() {
	for (int i = 0; i < 10; i++) {
		int input;
		cin >> input;
		height.push_back(input);
	}

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

	for (int i = 9; i >= 7; i--) {
		cout << height[i] << endl;
	}

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

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

int main(){
	short int h[10]={};
	

	for(short int i=1; i<=10;i++){
		cin >> h[i];
		if(!(0<=h<=10000)){
			i--;
			continue;
		}
	}
	cout<<endl;
	sort(h, h+10, greater<int>());
	for(short int i=0;i<3;i++){
		cout << h[i] << endl;
	}
	return 0;
}

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

int main() {
	int a = 0, b = 0, c = 0, h;
	for(int i = 0; i < 9; ++i){
		cin >> h;
		if(a < h){
			c = b;
			b = a;
			a = h;
		}
		else if(b < h){
		    c = b;
		    b = h;
		}
		else if(c < h){
			c = h;
		}
	}
	cout << a << endl << b << endl << c << endl;
	return 0;
}

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

int main(){
    
    int i;
    int max1, max2, max3;
    std::array <int, 10> hill;
    
    max2 = 0;
    max3 = 0;

    for (i = 0; i < 10; ++i) {
        std::cin >> hill.at(i);
        
        if (i == 0) max1 = hill.at(0);
        
        if (max1 < hill.at(i)) { 
            max2 = max1;                    
            max1 = hill.at(i);
        } else if (max2 < hill.at(i)) {
            max3 = max2;
            max2 = hill.at(i);
        } else if (max3 < hill.at(i)) max3 = hill.at(i);
        else {}
    }
    
    std::cout << max1 << std::endl << max2 << std::endl << max3 << std::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++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  while (true) {}
}