Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	heighs := make([]int, 10)
	for i := range heighs {
		heighs[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(heighs)))
	for i := 0; i < 3; i++ {
		fmt.Println(heighs[i])
	}
}

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

int main()
{
  int m[10];
  int max = 0;
  for (int i=0; i<10; i++)
  {
    cin >> m[10];
  }
  for(int i=0; i<3; i++)
  {
    for(int j=0; j<9; j++)
    {
      if ( m[i] < m[i+1] ) max = i+1;
    }
    cout << m[max] << endl;
    m[max] = -1;
  }
}

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

using namespace std;

const int N = 10;
int a[N];

int main() {
  for(int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a+N);
  for(int i = 0; i < 3; i++) printf("%d/n", a[i]);
}

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

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

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

int main(void) {
	int a[10] = { 0 };
	for (int i = 0; i < 10; i++) {
		cin >> a[i];
	}
	for (int j = 0; j < 3; j++) {
		int max = 0, label = 0;
		for (int i = 0; i < 10; i++) {
			if (a[i] > max) {
				max = a[i];
				label = i;
			}
		}
		cout << max << endl;
		a[label] = 0;
	}
	return 0;
}

C++: #include <iostream>


void Sort(int* a){
int tmp;
for(int i=0;i<10;i++){
for(int j=0;j<9;j++){
if(a[j]<a[j+1]){
tmp = a[j+1];
a[j+1]=a[j];
a[j] = tmp;
}
}
}
}



int main(){

int a[10];

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

std::cout << a[0] << std::endl;
std::cout << a[1] << std::endl;
std::cout << a[2] << std::endl;


}

C++: #include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <valarray>
#include <iterator>
using namespace std;
typedef long long int ll;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;

#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++)
#define ALL(container) container.begin(), container.end()
#define RALL(container) container.rbegin(), container.rend()
#define SZ(container) ((int)container.size())
#define mp(a,b) make_pair(a, b)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<class T> ostream& operator<<(ostream &os, const vector<T> &t) {
os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os;
}
template<class T> ostream& operator<<(ostream &os, const set<T> &t) {
os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os;
}
template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";}

const int INF = 1<<28;
const double EPS = 1e-8;
const int MOD = 1000000007;


int n;
int a[10];
main(){
	REP(i, 10) cin >> a[i];
	sort(a, a+10);
	printf("%d\n%d\n%d\n", a[9], a[8], a[7]);
	return 0;
}

C++: #include<stdio.h>

const int N=105;

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

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

using namespace std;

int main(int argc, const char * argv[])
{
    int height[10];
    for (int i=0; i<10; i++) {
        cin >> height[i];
    }
    sort(height, height+10, greater<int>());
    
    for (int i=0; i<3; i++) {
        cout << height[i] << endl;
    }
    
    return 0;
}

C++: #include <iostream>
#include <string>
#include <stringstream>
#include <vector>
#include <algorithm>
#include <map>
#include <cstdlib>
using namespace std;

#define REP(i,n) for(int i=0;i<n;++i)
#define rep(n) REP(i,n)
int hills[16];

int main()
{
	rep(10) cin>>hills[i];

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

	rep(3) cout<<hills[i]<<endl;

	return 0;
}

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

int hills[10] ;
int tops[3] = {0,0,0} ;

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

		if( hills[i] >= tops[0] )
		{
			tops[2] = tops[1] ;
			tops[1] = tops[0] ;
			tops[0] = hills[i] ;
		}
		else if( hills[i] >= tops[1] )
		{
			tops[2] = tops[1] ;
			tops[1] = hills[i] ;
		}
		else if( hills[i] >= tops[2] )
		{
			tops[2] = hills[i] ;
		}
	}

	for( int i = 0 ; i < 3 ; i ++ )
	{
		cout << tops[i] << "\n" ;
	}

	return 0 ;
}

C++: #include <iostream>
#include <queue>
#include <vector>
using namespace std;
 
int main()
{
    priority_queue< int,vector<int>,less<int> > que;
    int in;
 
    for(int i = 0; i < 10; i++){
        cin >> in;
        que.push(in);
    }
 
 
    for(int j = 0; j < 3; j++){
        cout << que.top() << '\n';
        que.pop();
    }
 
    return 0;
}

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

using namespace std;

int main(void){
	vector<int> table;

	for(int hight; cin >> hight; table.push_back(hight));

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

	for(int i = 9; i > 6; i --) cout << table[i] << endl;

	return 0;
}

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

int main () {
    int i, m1,m2,m3,h[10];
    for(i=0;i<10;i++)
        cin >> h[i];
    for(i=0;i<10;i++) {
        if(h[i]>=m1) {m3=m2;m2=m1;m1=h[i];}
        else if(h[i]<m1&&h[i]>=m2) {m3=m2;m2=h[i];}
        else if(h[i]<m2&&h[i]>=m3) {m3=h[i];}
    }
    cout << m1 << endl;
    cout << m2 << endl;
    cout << m3 << endl;
}

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

int main(void)
{
    int a;
    int b[3];
    for (int i = 0; i < 10; i++)
    {
        cin >> a;
        if(a>=b[0])
        {
            b[2] = b[1];
            b[1] = b[0];
            b[0] = a;
        }
        else if(a>=b[1])
        {
            b[2] = b[1];
            b[1] = a;
        }
        else if(a>=b[2])
        {
            b[2] = a;
        }

    }

    for (int i = 0; i < 3; i++)
    {
        cout << b[i] << "\n";
    }
}

C++: #include <iostream>

using namespace std;


int main(){

int a[11],max1,max2,max3;

	for (int i=0; i<10; i++){

		while (true){ 
		cout << "山の高さ" << i+1 << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}
	max1 = a[0];

	for (i=1; i<10; i++){
		if (max1 < a[i]){
			swap (max1,a[i]);
		}
	}
	max2 = a[1];

	for (i=2; i<10; i++){
		if (max2 < a[i]){
			swap (max2,a[i]);
		}
	}
	max3 = a[2];

	for (i=3; i<10; i++){
		if (max3 < a[i]){
			swap (max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

C++: #include <stdio.h>
#include <algorithm>
#include <functional>

using namespace std;

int main() {
    int input[10];
    for (int i = 0; i < 10; i++) {
        scanf("%d", &input[i]);
    }
    sort(input, input+10, greater<int>());
    for (int i = 0; i < 3; i++) {
        printf("%d\n", input[i]);
    }
}