Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	heights := make([]int, 10)
	for i := 0; i < 10; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}

	sort.Sort(sort.Reverse(sort.IntSlice(heights)))
	for i := 0; i < 3; i++ {
		fmt.Println(heights[i])
	}
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main() {
    int h[10];
    for (int i=0; i<10; ++i) cin>>h[i];
    partial_sort(h, h+3, h+10, greater<int>());
    cout<<h[0]<<endl<<h[1]<<endl<<h[2]<<endl;
}

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

int main(){
  std::vector<int> vech;
  for(int i = 0; i < 10; i++){
    std::cin >> vec[i];
  }
  std::sort(vec.begin(), vec.end(), std::greater<int>());
  for(int i = 0; i < 3; i++){
    std::cout << vec[i] << std::endl;
  }
}

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);
  for(int i=0;i<3;i++) cout << a[9-i] << endl;
}

C++: /*Function Template*/
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define ALL(a)  (a).begin(),(a).end()
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }

}
ll Len(ll n) {
  ll s=0;
  while(n!=0) s++, n/=10;
  return s;
}


ll Sint(ll n) {
  ll m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(ll i=s-1;i>=0;i--) m+=n/((ll)pow(10,i))-(n/((ll)pow(10,i+1)))*10;
  return m;
}


ll Svec(vector<ll> v){
  ll n=0;
  for(ll i=0;i<v.size();i++) n+=v[i];
  return n;
}


ll GCD(ll a,ll b){
  ll r,tmp;
/*自然数 a > b を確認・入替*/
  if(a<b){
    tmp=a,a=b,b=tmp;
  }
/*ユークリッドの互除法*/
  r=a%b;
  while(r!=0){
    a=b,b=r,r=a%b;
  }
  return b;
}


ll LCM(ll a,ll b){
  ll c=a,d=b,r,tmp;
/*自然数 a > b を確認・入替*/
  if(a<b){
    tmp=a,a=b,b=tmp;
  }
/*ユークリッドの互除法*/
  r=a%b;
  while(r!=0){
    a=b,b=r,r=a%b;
  }
  return c/b*d;
}


ll Factorial(ll n){
  ll m=1;
  while(n>=1) m*=n,n--;
  return m;
}

vector<pair<char,ll>> runlength(string s,vector<pair<char,ll>> p){
  ll x=1;
  if(s.size()==1){
    p.push_back(pair<char,ll>(s[0],1));
    return p;
  }
  for(ll i=0;i<s.size()-1;i++){
    if(s[i]==s[i+1]){
      x++;
      if(i==s.size()-2){
        p.push_back(pair<char,ll>(s[i],x));
      }
    }else{
      p.push_back(pair<char,ll>(s[i],x));
      x=1;
      if(i==s.size()-2){
        p.push_back(pair<char,ll>(s[s.size()-1],x));
      }
    }
  }
  return p;
}


ll COM(ll n,ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

const int MAX_N=100010;
vector<bool> sieve_of_eratosthenes(){
  vector<bool> isPrime(MAX_N+1,true);
  for(int i=2;i<=MAX_N;i++){
    if(isPrime[i]){
      for(int j=2*i;j<=MAX_N;j+=i){
        isPrime[j]=false;
      }
    }
  }
  return isPrime;
}







/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
int main() {
  IOS;
  vector<ll> v(10);
  rep(i,10) cin>>v[i];
  sort(ALL(v),greater<ll>());
  cout<<v[0]<<endl;
  cout<<v[1]<<endl;
  cout<<v[2]<<endl;
  
}

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

int main(void) {
  vector<int> x(10);
  int i = 0;
  for(; i < 10; i++) cin >> x[i];
  sort(x.begin(), x.end());
  for(i = 9; i > 6; i--) cout << x[i];
}

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){

    int a[10];
    for(int i=0;i<10;i++)
        scanf("%d",&a[i]);
    int b[3]={0};
    for(int i=0;i<3;i++)
    {
        int t;
        for(int j=0;j<10;j++)
        {
            if(a[j]>b[i])
            {
                b[i]=a[j];
                t=j;
            }
        }
        a[t]=0;
    }
    for(int i=0;i<3;i++)
        printf("%d\n",b[i]);

    return 0;
}

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

const int MAX_N = 10000;
int n;
int a[MAX_N];

void solve(){
	std::sort(a, a + n);
	for(int i = 0; i < 3; i ++){
		printf("%d\n", a[n - 1 - i]);
	}
}

int main(int argc, char const *argv[]){
//	freopen("in.txt", "r", stdin);

	for(n = 0; scanf("%d", &a[n]) != EOF; n ++);
	solve();

	return 0;
}

C++: #include <iostream>

using namespace std;

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

  for (int i = 0; i < 3; i++) {
    int max = 0;
    for (int i = 0; i < 10; i++) {
      max = hill[i] > max ? hill[i] : max;
    }

    cout << max << endl;

    for (int i = 0; i < 10; i++) {
      if (hill[i] == max) {
        hill[i] = 0;
        break;
      }
    }
  }

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

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

int main(int argc, const char * argv[]) {
    
    if(fin.fail()){
        cout << "load fail...";
    }
    
    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>
#include <algorithm>

using namespace std;

int main()
{
	int deta[11];

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

	sort (deta, deta + 10);

	for (int i = 9; i >= 7; i--){
		cout << deta[i] << endl;
	}

	return 0;
}

C++: #include<string>
#include<vector>
#include<algorithm>
#include<iostream>
using namespace std;
int main()
{
	int mountain[10];
	for (int i = 0; i < 10; i++)
	{
		cin>>mountain[i];
	}

	sort(mountain,mountain+10);
	cout<<mountain[9]<<endl;
	cout << mountain[8] << endl;
	cout << mountain[7] << endl;
	return false;
}

C++: #include<stdio.h>
           
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(i=0;i<10;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
       {tempmax=hai[i];id[0]=i;}
    }
    for(i=0;i<10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd&& i != id[0])
        {temp2nd=hai[i];id[1]=i;}
    } 
    for(i=0;i<10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd && i != id[1] && i != id[0])
       {temp3rd=hai[i];}
    }
           
    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);
           
    return 0;
}

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

#define ALL(a) a.begin(),a.end()

using namespace std;

int main()
{
  vector<int> v;
  int t;

  for ( int i = 0; i < 10; i++ ) {
    cin >> t;
    v.push_back(t);
  }

  sort(ALL(v));

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

  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
	int a[10];
	for(int b=0;b<10;b++)
	cin>>a[b];
	for(int i=0;i<10000000;i++)sort(a,a+10);
	for(int c =9;c>=7;c--)
	cout<<a[c]<<endl;
	}