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<bits/stdc++.h>

using namespace std;

int x[1000];
int temp[1000];
void MargeSort(int x[],int left,int right){
    int i,j,mid,k;
    if(left>=right)return;
    mid=(left+right)/2;
    MargeSort(x,left,mid);
    MargeSort(x,mid+1,right);
    for(i=left;i<=mid;i++){
        temp[i]=x[i];
    }
    for(i=mid+1,j=right;i<=right;i++,j--){
        temp[i]=x[j];
    }
    i=left; j=right;
    for(k=left;k<=right;k++){
        if(temp[i]>=temp[j])x[k]=temp[i++];
        else x[k]=temp[j--];
    }
}

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

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

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

using namespace std;

int main(void){
	int count = 0;
	int arr[10];
	cin >> arr[0] >> arr[1] >> arr[2] >> arr[3] >> arr[4] >> arr[5] >> arr[6] >> arr[7] >> arr[8] >> arr[9];
	set<int, greater<int> > nums;
	for (int i=0; i<10; ++i){
		nums.insert(arr[i]);
	}
	set<int, greater<int> >::iterator it = nums.begin();
	int n = 0;
	while (it != nums.end() && (n<3)){
		cout << *it << endl;
		++it;
		++n;
	}

	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cstring>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()
#define foreach(it,c) for(typeof(c.begin()) it=c.begin();it!=c.end();++it)

int main()
{
    vector<int> h; 
    int t;
    REP(10){ cin >> t; h.push_back(t);}
    sort(all(h));
    cout << h[9] << endl;
    cout << h[8] << endl;
    cout << h[7] << endl;

    return 0;
}

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

int main()
{
  int high;
  int temp1,temp2;
  int first=0,second=0,third=0;
  
  for(int i=0;i<10;i++){
    cout<<"山の高さ"<<i<<":";
    cin>>high;
    if(high>first){
      temp1=first;
      first=high;
      temp2=second;
      second=temp1;
      third=temp2;
    } else if (first>=high && high>second){
      temp2=second;
      second=high;
      third=temp2;
    } else if (second>=high && high>third){
      third=high;
    }
  }

  cout<<"1番目に高い山の高さ:"<<first<<endl;
  cout<<"2番目に高い山の高さ:"<<second<<endl;
  cout<<"3番目に高い山の高さ:"<<third<<endl;
  
  return 0;
}

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

int main() {
    vector<int> mountain;
    for(int i = 0; i < 10; i++){
      cin >> mountain.at(i);
    }
    sort(mountain.begin(), mountain.end());
    reverse(mountain.begin(), mountain.end());

    for (int i = 0; i < 3; i++) {
        cout << mountain.at(i) << endl;
    }
}

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

int main()
{
  int h1, h2, h3, n;
  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(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<bits/stdc++.h>
using namespace std;
int h[10];
int main(){
    for(int i=0;i<10;i++)cin>>h[i];
    sort(h,h+10,greater<int>());
    for(int i=0;i<3;i++){cout<<h[i]<<endl;}
}

C++: import java.io.*;
import java.util.*;
  
class Main{
public static void main(String[] args) throws IOException{
BufferedReader br=new BufferedReader(new InutStreamReader(System.in));
int n=10;
int[] k=new int[n];
for(int i=0;i<n;i++){
k[i]=Integer.parseInt(br.readLine());
}
Arrays.sort(k);
for(int i=0;i<3;i++){
System.out.println(k[n-i-1]);
}
}
}

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

using namespace std;

int main(){

	int A[10];
	int i;

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


	sort(A, A+10);

	cout << A[9] << endl;
	cout << A[8] << endl;
	cout << A[7] << endl;
}

C++: #include <iostream>
using namespace std;
#define N 10
int max(int x[], int n)
{
	int i,j;
	j=0;
	for(i=1; i<n; i++)
		if(x[i]<x[j]) j=i;
		return j;
}
void sel_sort(int x[], int n)
{
	int i, j;
	for(i=n; i>1; i--)
		{ j=max(x,i);   int temp=x[j];   x[j]=x[i-1];  x[i-1]=temp; }
	}
void main()
{
	int a[N], i;
	while(cin>>a[0])
	{
	for(i=1; i<N; i++)
		cin>>a[i];
	sel_sort(a, N);
	for(i=0; i<3; i++)
		cout<<a[i]<<endl;
	}
	
}

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 (max < h[i])
				max = i;
		}
		cout << h[max] << "\n";
		h[max] = -1;
	}
	return 0;
}

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

#define rep(i,n) for(int i = 0; i < n; i++)
#define ll long long
#define EPS 1.0e-8
#define MAX_N 100

int num[10];

int main(){
	rep(i,10) cin >> num[i];
	sort(num,num+10,greater<int>());
	printf("%d\n%d\n%d\n",num[0], num[1], num[2]);
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
int main(void){
    std::vector<int> a;
    for(int i=0;i<10;i++){
      int b;
      std::cin>>b;
      a.push_back(b);
    }
    sort(a.begin(),a.end(),std::greater<int>());
    for(int j=0;j<3;j++){
       std::cout<<a[j]<<"\n";
    }
}

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

using namespace std;

const int numOfMountain = 10;

int main(int argc, char** argv){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

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

    auto out = mountains.end();
    for(int i = 0; i < 3; i++) {
        out--;
        cout << *out << endl;
    }

    return 0;
}

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

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)+1):((m)-(n)+1)),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long INTEGER;
typedef double FLOAT;

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

void swap(int*a, int*b) {
  int t = *b;
  *b = *a;
  *a = t;
}

int main() {

  int hs[4];
  hs[3] = -1;

  rep (i, 10) {
    int h; cin >> h;
    if (i < 3) {
      hs[i] = h;
    } else {
      hs[3] = h;
      sort(hs, hs + 4);
      swap(hs, hs + 3);
      swap(hs + 1, hs + 2);
    }
  }

  rep (i, 3) {
    cout << hs[i] << endl;
  }

  return 0;
}

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

int main(){
int a[10],i=0;
for(;i<10;i++){
scanf("%d",&a[i]);
}
sort(a,a+10);
for(;i>6;i--){
printf("%d\n",a[i]);
}
return 0;
}