Go: package main

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

var (
	n  = 10
	sc = bufio.NewScanner(os.Stdin)
)

func main() {
	heights := make([]int, n, n)
	for i := 0; i < n; 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 a[10],f=0,s=0,t=0;
	for(int i=0;i<=9;i++){
		cin>>a[i];
		if(a[i]>t){
			t=a[i];
			if(s<t){
				swap(s,t);
				if(f<s){
					swap(f,s);
				}
			}
		}
	}
	cout<<f<<endl<<s<<endl<<t<<endl;
}

C++: #include <cstdio>
#include <functional>
#include <algorithm>
 
#define SIZE 10
#define MAX 10000
#define TOP 3
 
using namespace std;
 
int main() {
 int i = 0;
 int buf;
 int height[SIZE];
  
 while(i < SIZE) {
  scanf("%d", &buf);
   
  height[i] = buf;
 
  ++i;
 }
 
 sort(height, height + SIZE, greater<int>());
 
 for(i = 0; i < TOP; ++i) {
  printf("%d\n",height[i]);
 }
 
 return 0;
}

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

int main(){
  int a[10];
  int f=0,s=0,t=0;
  cin>>a[0];
  f=a[0];
  for(int i=1;i<10;i++){
    cin>>a[i];
    if(a[i]>=f){
      s=f;
      f=a[i];}
      else if(a[i]>=s){
	t=s;
	s=a[i];}
	else if(a[i]>=t){
	  t=a[i];}
  }
  cout<<f<<endl;
  cout<<s<<endl;
  cout<<t<<endl;
      
    
    
    

  return 0;
}

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

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

	do{
		flag = false;
		for(int i = 0 ; i < 9 ; i++){
			if(high[i] < high[i+1]){
				int hold = high[i+1];
				high[i+1] = high[i];
				high[i] = hold;
				flag = true;
			}
		}
	}while(flag == true);

	cout << high[0] << endl;
	cout << high[1] << endl;
	cout << high[2] << endl;

    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int n[15],temp;
	for(int i=0;i<10;i++)cin>>n[i];
	for(int i=0;i<10;i++){
		for(int j=i+1;j<10;j++){
			if(n[i]<n[j]){
				temp=n[i];n[i]=n[j];n[j]=temp;
			}
		}	
	}
	cout<<n[0]<<endl;
	cout<<n[1]<<endl;
	cout<<n[2]<<endl;
	return 0;
}

C++: #include<iostream>

using namespace std;

int main()
{
	int high[10] = { };
	int first = 0, second = 0, third = 0;
	
	for(int i = 0; i < 10; i++){
		cin >> high[i];
		
		if(first <= high[i]){
			second = first;
			first = high[i];
		}
		else if(second <= high[i]){
			third = second;
			second = high[i];
		}
		else if(third <= high[i])
			third = high[i];
	}
	
	cout << first << endl << second << endl << third << endl;
	
	
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int i,j,temp,y[10];
	for(i=0;i<10;i++){
		scanf("%d",&y[i]);
	}
	for(i=0;i<10;i++){
		for(j=0;j<=10;j++){
			if(y[j]<=y[i]){
				temp=y[i];
				y[i]=y[j];
				y[j]=temp;
			}
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",y[i]);
	}
	return 0;
}

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

using namespace std;

int main (void)
{
	int a[10],a1,a2,a3;
	a1 = 0;
	a2 =0;
	a3 = 0;

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

	for (int  i = 0; i < 10; i++)
	{
		if (a[i] >= a1)
		{
			a3 = 0;
			a3 = a2;
			a2 = 0;
			a2 = a1;
			a1 = 0;
			a1 = a[i];

		}
		else if (a2 <= a[i])
		{
			a3 = 0;
			a3 = a2;
			a2 = 0;
			a2 = a[i];
		}
		else if (a[i] >= a3)
		{
			a3 = 0;
			a3 = a[i];
		}

	}
	cout << a1 << endl << a2 << endl << a3 << endl;
}

C++: #include <stdio.h>

int main(){
  int input, output[3]={}, i;
  
  for( i=0; i<10; i++){
    scanf("%d", &input);
    if( input > output[0]){
      output[2] = output[1];
      output[1] = output[0];
      output[0] = input;
    }else if( input > output[1]){
      output[2] = output[1];
      output[1] = input;
    }else if( input > output[2]){
      output[2] = input;
    }
  }

  for( i=0; i<3; i++){
    printf("%d\n", output[i]);
  }
  
  return 0;
  }

C++: #include <bits/stdc++.h>
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define RFOR(i, a, b) for(int i = b; i >= a; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, 0, n)
#define VALL(v) v.begin(), v.end()
#define VSORT(v) sort(VALL(v));
using namespace std;
typedef vector<int> vi;

int main(){
    vi m(10);
    REP(i,10) cin >> m[i];
    VSORT(m);
    RFOR(i, 7, 9) cout << m[i] << endl;
}

C++: #include <stdio.h>

int fir(const int *);
int sec(const int *);
int thi(const int *);

int main(void)
{
	int i,h[10];
	for(i=0;i<10;i++){
		scanf("%d",&h[i]);
	}
	printf("%d",fir(h));
	printf("%d",sec(h));
	printf("%d",thi(h));
	return 0;
}

int fir(const int *h){
	int i,f=0;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	return f;
}

int sec(const int *h){
	int i,f,s;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	return s;
}

int thi(const int *h){
	int i,f,s,t;
	for(i=0;i<10;i++){
		f<h[i] ? f=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		f>=h[i] && s<h[i] ? s=h[i] : /*処理無し*/;
	}
	for(i=0;i<10;i++){
		s>=h[i] && t<h[i] ? t=h[i] : /*処理無し*/;
	}
	return t;
}

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

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

C++: #include <iostream>

using namespace std;

#define ARRAY_SIZE 10

void sort(int array[],int size){
    int tmp;
    for(int i=0;i<size;i++){
        for(int j=size-1;j>i;j--){
            if(array[j]>array[j-1]){
                tmp=array[j];
                array[j]=array[j-1];
                array[j-1]=tmp;
            }
        }
    }
}

int main() {
    int array[ARRAY_SIZE]={0};
    
    for(int i=0;i<10;i++) cin>>array[i];
    sort(array,(sizeof(array)/sizeof(array[0])));
    for(int i=0;i<3;i++){
        cout << array[i] << endl;
    }
    return 0;
}

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

int main()
{
  int first = 0, second = 0, third = 0;
  for (int i = 0; i < 10; i++) {
    int n;
    cin >> n;
    if (n > first) {
      third = second;
      second = first;
      first = n;
    } 
    else if(n > second) {
      third = second;
      second = n;
    }
    else if(n > third) {
      third = n;
    }
  }
  cout << first << " " << second << " " << third << endl;
  return 0;
}

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


int main()
{
    int arr[10];

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

    sort(arr , arr+10);

    cout<<arr[9]<<endl;

    cout<<arr[8]<<endl;

    cout<<arr[7];

    return 0;
}

C++: //-------------
//include
//-------------
#include <map>
#include <list>
#include <cmath>
#include <vector>
#include <string>
#include <cctype>
#include <random>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
//-------------
//typedef
//-------------
typedef long long LL;
typedef  vector<int> VI;
typedef  pair<int, int> PII;
typedef  vector<int, int> VII;
typedef  map<string, int> MSI;
//-------------
//utillty
//-------------
#define ALL(a)  (a).begin(),(a).end()
#define MK make_pair
#define PB push_back
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define COUT(a) cout<<a<<endl
//-------------
//repetition
//-------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)
//-------------
//debug
//-------------
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define dumpl(c) REP(i,SZ(c))cerr<<#c<<i<<"="<<(c[i])<<endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const int MOD = 1000000007;
int main()
{
	VI hill;
	REP(i, 10)
	{
		int temp;
		cin >> temp;
		hill.push_back(temp);
	}
	SORT(hill);
	COUT(hill[9]);
	COUT(hill[8]);
	COUT(hill[7]);
#ifdef _DEBUG
	while(1);
#endif // _DEBUG

	return 0;
}