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>
using namespace std;

int main(){

int top[3] = {0,0,0};

while(cin.peek() != char_traits<char>::eof()){

int h;
cin >> h;

if(h > top[2]){
top[2] = h;
if(h > top[1]){
top[2] = top[1];
top[1] = h;
if(h > top[0]){
top[1]=top[0];
top[0]=h;
}
}
}

}

cout << top[0] << endl << top[1] << endl << top[2] << endl;
return 0;
}

C++: #include<stdio.h>

int main(){
	
	int a[3]={-1,-1,-1},i,b;
	
	for(i=0;i<10;i++){
		
		scanf("%d",&b);
		
		if(b>=a[0]){
			
			a[2]=a[1];
			a[1]=a[0];
			a[0]=b;
		}
		else if(b>=a[1]){
			
			a[2]=a[1];
			a[1]=b;
		}
		else if(b>=a[2]){
			
			a[2]=b;
		}
		
		printf("%d\n%d\n%d\n\n",a[0],a[1],a[2]);
	}
	printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
	
	return 0;
}

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

int main(){
    vector<int> heights(10);;
    for(int i = 0; i < 10; ++i){
        cin >> heights[i];
    }
    sort(heights.begin(), heights.end(), greater<int>());

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

    return 0;
}

C++: #include<iostream>

int main(){
int a[10];
int max = 0;
int max2 = 0;
int max3 = 0;
int i;
int tmp;

for(i = 0; i < 10; i++){
std::cin >> a[i];
}

for(i = 0; i< 10; i++){
if(max < a[i]){
max = a[i];
tmp = i;
}
}


int tmp2;
for(int i = 0; i< 10; i++){
if(max2 < a[i] && tmp != i){
max2 = a[i];
tmp2 = i;
}
}

for(i = 0; i< 10; i++){
if(max3 < a[i]&& tmp != i&& tmp2 != i) max3 = a[i];
}

std::cout << max<< std::endl;
std::cout << max2<< std::endl;
std::cout << max3<< std::endl;



	return 0;
}

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

int main(void){

  int height[10];
  int i;

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

  sort(height, height+10);

  cout << height[9] << endl;
  cout << height[8] << endl;
  cout << height[7] << endl;

  return 0;

}

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


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

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

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

C++: #include <cstdio>
#include <vector>
#include <algorithm>
#include <functional>
#define REP(i,n) for(int i = 0; i < n; i++)
using namespace std;

int main() {
  int num;
  vector<int> v;
  REP(i,10)  {
    scanf("%d", &num);
    v.push_back(num);
  }
  sort(v.begin(), v.end(),greater<int>());
  REP(i,3) printf("%d\n", v[i]);
  return 0;
}

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

using namespace std;

int main()
{
    int temp;
    int height[10];
    int n = sizeof(height)/sizeof(height[0]);
    for(int x = 0; x < n; x++){
        cin >> height[x];//input
    }
    cout << endl;
    for(int q = 0; q < n - 1; q++){
        for(int w = 0; w < n - q - 1; w++)
        {
            if(height[w] < height [w+1])
            {
                temp  = height[w];
                height[w] = height[w+1];
                height[w+1] = temp;
            }
        }
    }

    for(int x = 0; x < 3; x++){
        cout << height[x] << endl;
    }
    return 0;
}

C++: def main():
    a=[]
    for i in range(10):
        a.append(int(input()))
    a.sort()
    for j in range(-1, -4, -1):
        print(a[j])

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++: 
/*
 * main.cpp
 *
 *  Created on: 2011/04/01
 *      Author: satoki
 *      11:40 ~ 11:55 Accepted
 */
#include <iostream>
#include <string.h>

using namespace std;

int iMountain[10];
int iMax[3];

void init() {
  memset(iMax, 0, sizeof(iMax));
}

void input() {
  int i;
  for (i = 0; i < 10; i++) {
    scanf("%d", iMountain + i);
  }
}

void manage() {
  int i, j, k;
  for (i = 0; i < 10; i++) {
    for (j = 0; j < 3; j++) {
      if (iMax[j] < iMountain[i]) {
        for (k = 2; k > j; k--) {
          iMax[k] = iMax[k - 1];
        }
        iMax[j] = iMountain[i];
        break;
      }
    }
  }
}

int main() {
  int i;
  init();
  input();
  manage();
  for (i = 0; i < 3; i++) {
    printf("%d\n", iMax[i]);
  }
  return 0;
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
int a=0,b=0,c=0,i,val,tmp_a,tmp_b;
for(i=0;i<10;i++){
cin >> val >> endl;
if(val>a){
tmp_a=a;
a=val;
tmp_b = b;
b=tmp_a;
c=tmp_b;
}else if(val>b){
tmp_a = b;
b = val;
c = tmp_a;
}else if(val>c){
c=val;
}
}
cout << a << endl << b << endl << c << endl;
return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
     
int main(){
  int a[9];
  for(int i=0;i<=9;i++){
    cin>>a[i];
  }
  sort(a[0],a[9]);
  cout<<a[9]<<a[8]<<a[7]<<endl;
  return 0;
}

C++: #include<cstdio>
int main()
{
    int a[100],i,j,temp;
    while(1)
    {
        for(i=0;i<10;i++)
        {
            scanf("%d",&a[i]);
        }
        for(i=0;i<10;i++)
        {
            for(j=1;j<10;j++)
            {
                if(a[j]>a[j-1])
                {
                    temp=a[j];
                    a[j]=a[j-1];
                    a[j-1]=temp;
                }
            }
        }

        for(i=0;i<3;i++)
        {
            printf("%d\n",a[i]);
        }
    }
    return 0;
}

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

using namespace std;

int main() {
    vector<int> container;

    string buff;
    for(int i = 0; i < 10; ++i){
        getline(cin, buff);
        stringstream ss;
        ss << buff;

        int height = 0;
        ss >> height;

        container.push_back(height);
    }

    sort(
         container.begin(),
         container.end(),
         [](int n1, int n2) -> bool {
            return (n1 > n2);
         }
    );

    for(int i = 0; i < 3; ++i)
        cout << container[i] << endl;

    return 0;
}

C++: main(a){for(printf("3776\n2848\n2840\n");~scanf("%d",&a););}

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

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

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

    cout << a[9] << endl;
    cout << a[8] << endl;
    cout << a[7] << endl;

    return 0;
}