Go: package main

import (
	"bufio"
	"os"
	"strconv"
	"sort"
	"fmt"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	heighs := make([]int, 10)
	for i := range heighs {
		heighs[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(heighs)))
	for i := 0; i < 3; i++ {
		fmt.Println(heighs[i])
	}
}

C++: #include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <vector>
#include <iostream>
#include <set>
using namespace std;
typedef long long ll;

int a[10];

int main(int argc, char const *argv[]) {
	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;
	return 0;
}

C++: #include<iostream>
#include<string.h>
#include<stdio.h>

using namespace std;

int main(){
    int top3Mountain[3];
    memset(top3Mountain, 0, sizeof(top3Mountain));
    
    for (int i=0; i<10; i++) {
        int newHeight = 0;
        scanf("%d", &newHeight);
        
        if (top3Mountain[0] < newHeight) {
            top3Mountain[2] = top3Mountain[1];
            top3Mountain[1] = top3Mountain[0];
            top3Mountain[0] = newHeight;
        } else if (top3Mountain[1] < newHeight) {
            top3Mountain[2] = top3Mountain[1];
            top3Mountain[1] = newHeight;
        } else if (top3Mountain[2] < newHeight) {
            top3Mountain[2] = newHeight;
        }
    }
    
    for (int i=0; i<3; i++) {
        printf("%d\n", top3Mountain[i]);
    }
    
    return 0;
}

C++: 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>
using namespace std;
   
int main(void){
   
  int h[10];
　int a = 0;
   
  std::cin >> h;
   
  for(int j=0; j<3; j++){
    for(int i=0; i<10; i++){
        if(h[a]<h[i]) a = i;
    }
    cout << h[a] << endl; 
    h[a] = 0;
  }  
   
  return 0;
}

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

int i,a[10]={};

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

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

int main(void){
    int height[10];
    for(int i=0;i<10;i++)
        std::cin>>height[i];
    std::sort(height,height+10);
    std::cout<<height[0]<<std::endl<<height[1]<<std::endl<<height[2]<<std::endl;
    return 0;
}

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

int main() {
 int top[5]={0,0,0,0,0};
 int yama;

 cin >> top[0];
 
 for(int i=0; i<9; i++){
  cin >> yama;
  
  for(int j=0; j<3; j++){
   if(yama >top[j]){
    top[j+2] = top[j+1];
    top[j+1] = top[j];
    top[j] =yama;
    break;
   }
  }
 }
 for(int i=0; i<3; i++)
  cout << top[0] << endl;

 return 0;
}

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

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

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

int main(void) {
    vector<int> v;
    for (int i = 0; i < 10; i++) {
        int input;
        scanf("%d", &input);
        v.push_back(input);
    }
    sort(v.rbegin(), v.rend());
    for (int i = 0; i < 3; i++) {
        printf("%d\n", v[i]);
    }
}

C++: #include <iostream>
using namespace std;
int main(){
	int mount[10];
	for(int num=0;num<10;num++){
	 // cout << "Mount"<<num << endl;
	  cin >> mount[num];
    }
    for(int i=0;i<10;i++){
     for(int j=i+1;j<10;j++){
	  if(mount[i]<mount[j]){
	 	 int sub=mount[j];
	 	 mount[j]=mount[i];
	 	 mount[i]=sub;
	   }
     }
    }
   cout << mount[0] << endl;
   cout << mount[1] << endl;
   cout << mount[2] << endl;
  return 0;
}

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

int main(){
	int nya[10];
	int hoge;
	for (int j=0;j<10;j++) {
		cin >> nya[j];
	}
	for (int i=0;i<20;i++){
		for (int k=1;k<10;k++){
			if (nya[k] > nya[k-1]) {
				hoge = nya[k-1];
				nya[k-1] = nya[k];
				nya[k] = hoge;
			}
		}
	}
//	for(int i=0;i<10;++i)	cout << nya[i] <<endl;
	cout << nya[0] << endl << nya[1] << endl << nya[2] << endl;
	return 0;
}

C++: #include <iostream>
using nameplace std;
int main(){
   int h[10];
 for(int i=0;i<10;i++){
      cin>>h[i];
 }
 for(int k=0;i<10;i++){
  for(int j=0;j<10-i;j++){
        if(h[j]<h[j+1]){
          swap(h[j],h[j+1]);
         }
      }
}
cout<<h[0]<<endl;
cout<<h[1]<<endl;
cout<<h[2]<<endl;
return 0;
}

C++: #include <stdio.h>

int main( void ){
    int m_Higher[10];
    for( int i = 0;i < 10;i++ ) scanf( "%d",&m_Higher[i] );

    bool Flg  = false;
    while( true ) {
        for( int i = 0;i < 10 - 1;i++ ){
            if( m_Higher[i] < m_Higher[i+1] ){
                int buf = m_Higher[i];
                m_Higher[i] = m_Higher[i+1];
                m_Higher[i+1] = buf;
                Flg = true;
            }
        }
        if( !Flg ) break;
        Flg = false;
    }

    for( int i = 0;i < 3;i++ ) printf( "%d",m_Higher[i] );
    return 0;
}

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

int main(){
	int suchi,high=0,middle=0,low=0,i,flag=0,a,b,c;
	
	for(i=0;i<10;i++){
		cin>>suchi;
			
		if(flag==0){
			low=suchi;
			middle = suchi;
			high = suchi;
			flag++;
			}
			
		else{
			if(suchi>low&&suchi<middle)
				low = suchi;
			
			else if(suchi>middle&&suchi<high){
				low = middle;
				middle = suchi;
			}
			
			else if(suchi>high){
				low = middle;
				middle = high;
				high = suchi;
			}
				
			}
	}
	
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low<<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);
	cout << array[9] << endl;
	cout << array[8] << endl;
	cout << array[7] << endl;

	return 0;
}

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

int main(){
	int date[10], work;
	for(int i = 0; i < 10; i++){
		cin >> date[i];
	}

	for(int i = 9; i > 6; i--){
		for(int j = i; j >= 0; j--){
			if(date[i] < date[j]){
				work = date[i];
				date[i] = date[j];
				date[j] = work;
			}
		}
		cout << date[i] << endl;
	}
	return 0;
}

C++: #include<iostream.h>
#include<vector.h>
#include<algorithm.h>
int main(){int n,i;vector<int> h;for(i=0;i<10;++i)cin>>n,h.push_back(n);sort(h.begin(),h.end());for(i=9;i>6;i--)cout<<h[i]<<endl;}

C++: #include<stdio.h>
int main(void) {
	int a, b, c[12],top=0,second=0,thread=0;
	for (int i = 1; i <= 10; i++)
	{
		scanf("%d", &c[i]);
		if (c[i]>=top)
		{
			if (c[i] == top)continue;
			second = top;
			top = c[i];
		}
		else
		{
			if (c[i]>=second)
			{
				if (c[i] == second)continue;
				thread = second;
				second = c[i];
			}
			else
			{
				if (c[i]>thread)
				{
					thread = c[i];
				}
			}
		}
	}
	printf("%d\n%d\n%d\n", top, second, thread);
	return 0;
}

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

int main(){
	bool flag;
	int result[3],buf,temp[10];
	for(int i = 0; i < 10; i++){
		cin >> temp[i];
	}
	for(int l = 0; l < 3; l++){
		while(1){
			for(int j = l; j < 9; j++){
				if(temp[j] < temp[j+1]){
					buf = temp[j+1];
					temp[j+1] = temp[j];
					temp[j] = buf;
				}
			}
			flag = false;
			for(int k = l; k < 9; k++){
				if(temp[l] < temp[k]) flag = true;
			}
			if(flag != true){
				result[l] = temp[l];
				break;
			}
		}
	}
	cout << result[0] << endl;
	cout << result[1] << endl;
	cout << result[2] << endl;
	return 0;
}