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 <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>
#include <string>
#include <string.h>
#include <queue>
#include <map>
#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--)
#define MAX_N 105
int vx [4]= {1,0,-1,0};
int vy [4]= {0,1,0,-1};
long long  dp[MAX_N][21]={};//dp[iテァツ閉ェテァツ崢ョテ」ツ?セテ」ツ?ァテ」ツ?ォ][テ・ツ?、]テッツシツ敕・ツ?凝ヲツ閉ー
int V[MAX_N],W[MAX_N];
int data[MAX_N],B[MAX_N];
int K ,N,a[MAX_N];
using namespace std;
void init(){

  /*cin >> N;
  cin >> a[1];
    dp[1][a[1]]=1;
  for(int l= 2;l<=N-1;l++){
    cin >> a[l];
    for(int i= 0;i<=20;i++){
      if(i-a[l]>=0&&i-a[l]<=20) dp[l][i] += dp[l-1][i-a[l]];
      if(i+a[l]>=0&&i+a[l]<=20) dp[l][i] += dp[l-1][i+a[l]];
    }
      //REP(i,21)cout<<l<<':'<< i<<' '<<dp[l-1][i]<<endl;
  }
  //REP(i,21)cout<< i<<' '<<dp[N-1][i]<<endl;
  cin >> a[N];
  cout << dp[N-1][a[N]]<<endl;
  */
}
void solve(){
  init();

}
int main(){
    vector<int>h ;
    int t;
    REP(i,10)
    {cin >> t;
    h.push_back(t);
  }
  sort(h.begin(),h.end());
  reverse(h.begin(),h.end());
  REP(i,3)cout << h[i]<<endl;
}

C++: #include <stdio.h>
#include <math.h>
 
int main() {
    int m[10];
    int ans[3];
    for(int i=0; i<10; i++) scanf("%d", &m[i]);
 
    ans[0] = 0; ans[1] = 0; ans[2] = 0;
    for(int j=0; j<10; j++) {
        if(m[ans[0]] < m[j]) {
            ans[0] = j;
        }
    }
    if(ans[1] == ans[0]) {
        if(ans[1] == 0) ans[1] = 1;
        else ans[1] = ans[0]-1;
    }
    for(int j=0; j<10; j++) {
        if(m[ans[1]] < m[j] && ans[0] != j) {
            ans[1] = j;
        }
    }
    if(ans[2] == ans[0]) {
        if(ans[2] == 0) ans[2] = 2;
        else ans[2] = ans[0]-2;
    }
    for(int j=0; j<10; j++) {
        if(m[ans[2]] < m[j] && ans[0] != j && ans[1] != j) {
            ans[2] = j;
        }
    }
    printf("%d\n%d\n%d\n", m[ans[0]], m[ans[1]], m[ans[2]]);
    return 0;
}

C++: #include <iostream>
#include <stdlib.h>
#include <string.h>
#include <sstream>
#include <iostream>
#include <math.h>
#include <iomanip>

using namespace std;

string float_to_string(float f, int digits)
{
  if (f == 0) {
    f = 0;
  }
  ostringstream oss;
  oss << setprecision(digits) << setiosflags(ios::fixed) << f;
  return oss.str();
}

void calc_and_output(int *c)
{
  float x = (float)(c[1]*c[5]-c[2]*c[4])/(c[1]*c[3]-c[0]*c[4]);
  float y = (float)(c[0]*c[5]-c[2]*c[3])/(c[0]*c[4]-c[1]*c[3]);

  cout << float_to_string(x, 3) << " " << float_to_string(y, 3) << endl;
}

int main(int argc, char const* argv[])
{
  int c[6];

  string line;
  while (getline(cin, line)) {
    istringstream iss(line);
    int val;
    int c[6];
    for (int i = 0; i < 6; i++) {
      iss >> val;
      c[i] = val;
    };

    calc_and_output(c);
  }

  return 0;
}

C++: //include----------------------------------------------------------------------------------------------------------------------
#include <bits/stdc++.h>
 
//using namespace--------------------------------------------------------------------------------------------------------------
using namespace std;
 
//define-----------------------------------------------------------------------------------------------------------------------
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#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, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define INF 1 << 25
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << "\n";
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
 
//typedef----------------------------------------------------------------------------------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned int uint;
typedef unsigned long long ull;
 
//const------------------------------------------------------------------------------------------------------------------------
const double EPS = 1e-10;
const double PI = acos( -1.0 );
 
//global-----------------------------------------------------------------------------------------------------------------------
vector<int> a(10);
 
//function---------------------------------------------------------------------------------------------------------------------
int main() {
    rep( i, 10 ) {
        scanf( "%d", &a[ i ] );
    }
    sort( a.begin(), a.end() );
    ROF( i, 9, 7 ) {
        printf( "%d\n", a[ i ] );
    }
    return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a ; i ++)
int main(void){
	int h[10];
	rep(i,10)cin>>h[i];
	sort(h,h+10);
	rep(i,3)cout<<h[10-i-1]<<endl;
}

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

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

  for(int k=0;k<3;k++){
    for(int j=0;j<10;j++){
      if(t[k]<x[j]){
        s=t[k];
        t[k]=x[j];
        x[j]=s;
       }
     }
  }
  for(int e=0;e<3;e++){
    cout<<t[e]<<endl;
  }
return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
#define ll long long
#define pb push_back

# define inOut(a,b) freopen(a,"r",stdin);freopen(b,"w",stdout);
# define RESET(a) memset(a,0,sizeof(a))
# define MEMO(a) memset(a,-1,sizeof(a))
# define DEBUG puts("Debug-Has-Come-Until-Here")


typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;

int main(){
	cin.tie(NULL);
	
	int height, max1(0), max2(0), max3(0);
	while(scanf("%d", &height) != EOF){
		if (height >= max1){
			max3 = max2;
			max2 = max1;
			max1 = height;
		}else if (height >= max2){
			max3 = max2;
			max2 = height;
		}else if (height >= max3){
			max3 = height;
		}
	}
	printf("%d\n%d\n%d\n", max1, max2, max3);

	return 0;
}

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

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

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