Go: package main

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

var rdr = bufio.NewReaderSize(os.Stdin, 1000000)

func readLine() string {
	buf := make([]byte, 0, 1000000)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func toInt(str string) int {
	n, _ := strconv.Atoi(str)
	return n
}

func main() {
	lst := make([]int, 0)
	for i := 0; i < 10; i++ {
		lst = append(lst, toInt(readLine()))
	}
	sort.Ints(lst)
	for i := 9; i > 6; i-- {
		fmt.Println(lst[i])
	}
}

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

int main() {
/*	int a[3];
	cin >> a[0] ;
	a[1] = 3;
	a[2] = a[0] * 10;

	cout << a[0] <<" " << a[1] <<" "<< a[2] << endl;
	
	for (int i = 0; i < 3; i++) {
		cout << a[i] << endl;
	}


	sort(a,a+5);
*/
	int a[10];
	for (int i = 0; i < 10; i++) {
		cin >> a[i];
	}
	
	sort(a,a+10,greater<int>());

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

	return 0;
}

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

static void input(std::vector<int>& hills)
{
    int val = 0;
    
    if (0x00 == &hills) {
        std::cerr << "hills is null" << std::endl;
        exit (1);
    }
 
    while (std::cin >> val) {
        hills.push_back(val);
    }
}

static int getMax(std::vector<int>& hills)
{
    if (0x00 == &hills) {
        std::cerr << "hills is null" << std::endl;
        exit (1);
    }

    std::sort(hills.begin(), hills.end());
    int ret = hills.back();
    hills.pop_back();

    return ret;
}

int main()
{
    std::vector<int> vec;

    input(vec);
    for (int i = 0; i < 3; i++) {
        std::cout << getMax(vec) << std::endl;
    }

    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 <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
	vector<int> v;
	int a[10];
	for(int i = 0;i < 10;i++){
		cin >> a[i];
	}
	v.assign(&a[0], &a[10]);
	sort(v.begin(), v.end());
	for(int i = 9;i > 6;i--)cout << v[i] << endl;
    return 0;
}

C++: #include <iostream>
int main(void)
{
    int array[3] = {};
    int min = 0;
    int input;
    for(int i=0;i < 10;++i){
        std::cin >> input;
        if(i >= 3){
            if(array[min] < input){
                array[min] = input;
            }
            else{
                continue;
            }
        }
        else{
            array[i] = input;
        }
        min = array[0] < array[1] ? (array[0] < array[2] ? 0 : 2) : (array[1] < array[2] ? 1 : 2);
    }
    int max = array[0] > array[1] ? (array[0] > array[2] ? 0 : 2) : (array[1] > array[2] ? 1 : 2);
    std::cout << array[max] << std::endl;
    std::cout << array[3 - max - min] << std::endl;
    std::cout << array[min] << std::endl;
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a;
  int x=0;
  int y=0;
  int z=0;
  for(int i=1;i<=10;i++){
    cin >> a;
    if(a>=x){
      x=a;
    }else if(y<=a<=x){
      y=a;
    }else if(z<=a<=y){
      z=a;
    }
  }
  cout << x << endl;
  cout << y << endl;
  cout << z << endl;
}

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

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

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

int main()
{
  int h1, h2, h3, n, tmp;
  h1 = h2 = h3 = 0;
  for(int i = 0; i < 10; i++){
    cin >> n;
    h1 = (i == 0) ? n : h1;
    h2 = (i == 1) ? n : h2;
    h3 = (i == 2) ? n : h3;
    if(h1 < h2){
      tmp = h1;
      h1 = h2;
      h2 = tmp;
    }
    if(h2 < h3){
      tmp = h2;
      h3 = h2;
      h2 = tmp;
    } 
    if(i > 2){
      if(n > h1){
	h3 = h2;
	h2 = h1;
	h1 = n;
      }else{
	if(n > h2){
	  h3 = h2;
	  h2 = n;
	}else{
	  if(n > h3){
	    h3 = n;
	  }
	}
      }
    }
  }
  cout << h1 << endl << h2 << endl << h3 << endl;
}

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

using namespace std;

int main()
{
	deque<int> nums;

	for( int i = 0; i < 10; i++ )
	{
		int in;
		cin >> in;
		nums.push_back( in );
	}
	
	
	sort( nums.begin(), nums.end(), greater<int>() );
	int cnt = 1;

	deque<int>::iterator it = nums.begin();
	while( it != nums.end() )
	{
		cout << *it << endl;
		++it;
		cnt++;
		if( cnt == 4 ) break;
	}

	return 0;
}

C++: #include<stdio.h>
#include<algorithm>
#include<iostream>
using namespace std;
     
int main(void){
    /* 宣言と初期化 */
    int hai[10];
    int id[2];
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
              
for(i=0;i<10;i++)
{
   cin >> hai[i];
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0];
    /* 計算 */
for(int j=9;j>1;j--){
    for(i=0;i<j;i++){
        /* 最大値求める */
        if(hai[j]<hai[i])
       {tempmax=hai[i];
         hai[i]=hai[j];
         hai[j]=tempmax
        }
    }
    }

    /* 表示 */
    printf("%d\n",hai[9]);
    printf("%d\n",hai[8]);
    printf("%d\n",hai[7]);
              
    return 0;
}

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

int main() {
	int h[10],max;
	for (int i = 0; i < 10; i++) {
		cin >> h[i];
	}
	
	for (int j = 0; j < 3; j++) {
		max = 0;
		for (int i = 1; i < 10; i++) {
			if (h[max] < h[i])
				max = i;
		}
		cout << h[max] << "\n";
		h[max] = -1;
	}
	return 0;
}

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

int main(void) {
    int height[10];
    
    for(int i = 0; i < 10; ++i) {
        while(!(0 <= height[i] & height[i] <= 10000)) {
            cout << "No." << i + 1 << " : " << flush;
            cin >> height[i];
        }
    }
    sort(height, height + 10);
    
    for(int i = 0; i < 3; ++i) {
        cout << height[9 - i] << endl;
    }
}

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, greater<int>());
    for(int i = 0 ; i < 3 ; i++){
	cout << M[i] << endl;
    }
    return 0;
}

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

int main() {
	int first, second, third;
	first=0;
	second=0;
	third=0;
	int i;
	for(i=1;i<=10;i++){
		if(height of mountain i > third){
			if(height of mountain i > second){
				if(height of mountain i > first){
					first=i;
				}else{
					second=i;
				}
			}else{
				third=i;
			}
		}
	}
	cout << first << endl;
	cout << second << endl;
	cout << third << endl;
	return 0;
}

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

int main(){
  int m, m1 = 0, m2 = 0, m3 = 0;
  for(int i=0;i<10;i++){
    cin >> m;
    if(m > m1){
      m3 = m2;
      m2 = m1;
      m1 = m;
    }else if(m > m2){
      m3 = m2;
      m2 = m;
    }else if(m > m3){
      m3 = m;
    }
  }
  cout << m1 << endl;
  cout << m2 << endl;
  cout << m3 << 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[i] << endl;

	return 0;
}

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

using namespace std;

#define rep(i, n) for (int i = 0; i < int(n); ++i)

int main() {
  int a[10];
  rep (i, 10) cin >> a[i];
  sort(a, a+ 10, greater<int>());
  cout << a[0] << endl;
  cout << a[1] << endl;
  cout << a[2] << endl;
  return 0;
}