Go: package main

import "fmt"

func main() {
	var height int
	topHeights := [5]int{}

	for i := 0; i < 10; i++ {
		fmt.Scan(&height)

		for j := 0; j < 3; j++ {
			if topHeights[j] < height {
				topHeights[j+2] = topHeights[j+1]
				topHeights[j+1] = topHeights[j]
				topHeights[j] = height
				break
			}
		}
	}

	for i := 0; i < 3; i++ {
		fmt.Println(topHeights[i])
	}
}

C++: #include<stdio.h>
#include<string.h>
#include<iostream>
#include<algorithm>
#include<queue>
#define ll __int64
#define mmax 1010
using namespace std;
int h[11];
int main()
{
    for(int i=0;i<10;i++)
        scanf("%d",&h[i]);
    sort(h,h+10);
    for(int i=9;i>=7;i--)
    {
        cout<<h[i]<<endl;
    }
}

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

int main(){

int[3] top = {0,0,0};

while(cin.peek != EOF){

int h;
cin >> h;

if(h > top[2]){
top[2] = h;
if(h > top[1]){
top[2] = top[1];
top[1] = h;
if(h > top[0]){
top[1]=top[0];
top[0]=h;
}
}
}

}

cout << top[0] << endl << top[1] << endl << top[2] << endl;
return 0;
}

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

using namespace std;

int main() {
    array<int,10> ar;
    for(int i=0;i<10;i++){
        int height;
        cin >> height;
        ar[i]=height;
        }
    sort(ar.begin(),ar.end());
    for(int j=0;j<3;j++){
        cout << ar[9-j] << endl;
        
    }
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


int main(){
	vi hills(10);
	rep(i, 10) cin >> hills[i];
	sort(all(hills),greater<int>());
	rep(i, 3) cout << hills[i] << endl;
	
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int n,a[50];
int main(){
    cin>>n;
    for(int i=1;i<=n;i++) cin>>a[i];
    sort(a+1,a+1+n);
    for(int i=n;i>=n-2;i--){
        cout<<a[i]<<endl;
    }
}

C++: 
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <set>
#include <map>
#define INF 100000
using namespace std;

int main(){
    vector<int> yama;
    for (int i=1; i<10; i++) {
        int hi;
        cin >>hi;
        yama.push_back(hi);
    }
    sort(yama.begin(), yama.end());
    for (int i=0; i<3; i++) {
        cout << yama[8-i]<<endl;
    }
}

C++: import java.util.Arrays;

class Main {
  public static void main(String[] args) {
    int n = 10, m = 3;
    int[] arr = new int[n];

    for (int i = 0; i < n; i++){
      arr[i] = new java.util.Scanner(System.in).nextInt();
    }

    Arrays.sort(arr);

    for (int i = n - 1; i >= n -m; i--){
      System.out.println(arr[i]);
    }
  }
}

C++: #include <bits/stdc++.h>

using namespace std;

typedef long long ll;


int main() {
  int h[10];

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

  sort(h, h+10);

  for (int i = 9; i > 9-3; i--) {
    std::cout << h[i] << std::endl;
  }

}

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

int main()
{
  int sort[3] = {};
  int temp, i, n, t;
  temp = t = n = 0;
  
  while(cin >> temp){
    if(n++ == 10) break;
    for(i = 0; i < 3; i++){
      if(sort[i] < temp){
	t = sort[i];
	sort[i] = temp;
	temp = t;
      }
    }
  }
  
  for(i = 0; i < 3; i++){
    cout << sort[i] << "\n";
  }

  return 0;
}

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

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

C++: #include <cstdio>
#include <algorithm>
#include <vector>
int main(){
  int i,x;
  std::vector<int>v;
  for(i=0;i<10;i++)scanf("%d",&x),v.push_back(x);
  std::sort(v.begin(),v.end());
  printf("%d\n%d\n%d\n",v[9],v[8],v[7]);
}

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;
  }
  return 0;
}

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

main() {
  vector<int> v;
  for(int tc = 0; tc < 10; ++tc) {
    int h;
    cin >> h;
    v.push_back(h);
  }
  sort(v.begin(), v.end(), greater<int>());
  for(int i = 0; i < 3; ++i) cout << v[i] << endl;
}

C++: #include <iostream>

using namespace std;

static const int ARRAY_NUM = 10;

class sort{
private:
	int tmp;
public:
	int* bable(int a[]);
};

int* sort::bable(int a[]){
	for(int i=0;i<ARRAY_NUM;++i){
		for(int j=ARRAY_NUM-1;j>i;--j){
			if(a[j]>a[j-1]){
				tmp    = a[j-1];
				a[j-1] = a[j];
				a[j]   = tmp;
			}
		}
	}
	return a;
}

int main(void){

	//int *array = new int [5];
	sort sort;
	int hgt_mt[10];
	int* hgt_max;

	//cout << "input height of mountain" << endl;

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

	hgt_max = sort.bable(hgt_mt);

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

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int t1,t2,t3,T;
	for(int i;i<10;i++){
		cin>>T;
		if(T>=t1){
			t3=t2;
			t2=t1;
			t1=T;
		}
		else if(T>=t2){
			t3=t2;
			t2=T;
		}
		else if(T>=t3){
			t3=T;
		}
	}
	cout<<t1<<endl<<t2<<endl<<t3;
	return 0;
}

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

using namespace std;

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

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
    vector<int> mountain(10);
    for (int i = 0 ; i < 10 ; i++)
        scanf("%d",&mountain[i]);
    sort(mountain.rbegin(),mountain.rend());
    printf("%d\n%d\n%d\n",mountain[0],mountain[1],mountain[2]);
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(void){
std::vector<int> h;
int tmp;
while(std::cin>>tmp){
h.push_back(tmp);
}

auto p=std::unique(h.begin(),h.end());
std::sort(h.begin(),p);
for(int i=0;i<3;i++){
std::cout<<h[i]<<std::endl;
}
return 0;
}

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

int main()
{
	set <int> s;
	set<int>::iterator si;
	for (int i = 0; i < 10; i++){
		int h;
		cin >> h;
		s.insert(h * (-1));
	}

	si = s.begin();
	for (int i = 0; i < 3;i++){
		cout << *si * (-1)<< endl;
		si++;
	}
	

	return 0;
}

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

int main(){

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

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

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

  return 0;
}

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

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