Go: package main

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

func getsAsIntArray() (line []int) {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		str := scanner.Text()
		if str == "" {
			break
		}
		data, err := strconv.Atoi(str)
		if err != nil {
			break
		}
		line = append(line, data)
	}

	return
}

func main() {

	lines := getsAsIntArray()
	sort.Sort(sort.Reverse(sort.IntSlice(lines)))
	for i, v := range lines {
		if i < 3 {
			fmt.Println(v)
		}
	}
}

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;
}

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

int main() {
	int h[10];

	for (int i = 0; i < 10; i++)
		std::cin >> h[i];

	std::sort(h, h + 10);

	std::cout
		<< h[9] << std::endl
		<< h[8] << std::endl
		<< h[7] << std::endl;
}

C++: #include <stdio.h>

int main(void)
{
	int i,f=0,s=0,t=0,h[10];
	for(i=0;i<10;i++){
		scanf("%d",&h[i]);
	}
	for(i=0;i<10;i++){
		if(f<h[i]){
			f=h[i];
		}
	}
	for(i=0;i<10;i++){
		if(s<h[i]&&f<=h[i]){
			s=h[i];
		}
	}
	for(i=0;i<10;i++){
		if(t<h[i]&&s<=h[i]){
			t=h[i];
		}
	}
	printf("%d\n%d\n%d\n",f,s,t);
	return 0;
}

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

int main(){
  int h[9];
  int i;
  for(i=0;i<=9;i++){
    cin>>h[i];
  }

  sort(h, h+10, greater<int>());

  cout<<h[0]<<h[1]<<h[2];

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
int x,No1,No2,No3;
No1=0;
No2=0;
No3=0;
for(int i=0;i<10;i++){
cin>>x;
if(x>No1){
No3=No2;
No2=No1;
No1=x;
}else if(x>No2){
No3=No2;
No2=x;
}else if(x>No3){
No3=x;
}
}
cout<<No1<<endl<<No2<<endl<<No3<<endl;
return 0;
}

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

int main() {
	int mt[10];
	int best[3]={-1, -1, -1};
	for(int i=0; i<10; ++i) {
		cin >> mt[i];
	}

	for(int i=0; i<10; ++i) {
		if(mt[i]>best[2]) {
			if(mt[i]>best[1]) {
				best[2]=best[1];
				if(mt[i]>best[0]) {
					best[1]=best[0];
					best[0]=mt[i];
				} else {
					best[1]=mt[i];
				}
			} else {
				best[2]=mt[i];
			}
		}
	}
	
	cout << best[0] << endl
		 << best[1] << endl
		 << best[2] << endl;
}

C++: #include <iostream>
#define N 10

using namespace std;

void swap(int& a, int& b){
	int tmp = a;
	a = b;
	b = tmp;
}

void bubble_sort(int mountain[N]){
	for (int i=0; i<N; ++i){
		for (int j=0; j<(N-i); ++j){
			if (mountain[j] < mountain[j+1]){
				swap(mountain[j], mountain[j+1]);
			}
		}
	}
}

int main(void){
	int mountain[N];
	for (int i=0; i<N; ++i){
		int tmp;
		do{
			cin >> tmp;
			if ((tmp<0) || (10000 < tmp)){
				return -1;
			}
		}while ((tmp<0) || (10000 < tmp));
		mountain[i] = tmp;
	}
	bubble_sort(mountain);
	//cout << "output" << endl;
	for (int i=0; i<3; ++i){
		cout << mountain[i] << endl;
	}
	return 0;
}