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 i,h,a=0,b=0,c=0;
    for(i=0;i<10;i++){
    cin >> h;
    if(a<h){
        c=b;
        b=a;
        a=h;
    }else if(b<h){
        c=b;
        b=h;
    }else if(c<h){
        c=h;
        }
    }
    cout << a << endl << b << endl << c << endl;
return 0;
}

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

int main() {
  int i;
  int height[10];
  for(i = 0; i < 10; i++) {
    scanf("%d", height+i);
  }
  std::sort(height, height+10);

  printf("%d\n%d\n%d\n", height[9], height[8], height[7]);

  return 0;
}

C++: #include <iostream>

using std::cin;
using std::cout;
using std::endl;

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

    for (int i = 0; i < 10; ++i) {
        for (int j = 0; j < 10; ++j) {
            if (heights[i] > heights[j]) {
                heights[10] = heights[i];
                heights[i] = heights[j];
                heights[j] = heights[10];
            }
        }
    }

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

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

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

int main(){
	int a,b,c,x;

	for(int i=0;i<=9;i++){
		cin >> x;

		if(x>a){
			c=b;
			b=a;
			a=x;
		}else if(x>b){
			c=b;
			b=x;
		}else if(x>c){
			c=x;
		}
	}

	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<<endl<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl;
}

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

int main(){
    int i;
    int A[10];
    for(i = 0; i < 10; i++){
        cin >> A[i];
    }
    int a = -1, b = -1, c = -1;
    for(i = 0; i < 10; i++){
        if(a <= A[i]){ a = A[i]; }
        else if(b <= A[i]){ b = A[i]; }
        else{ c = A[i]; }
    }
    cout << a << endl;
    cout << b << endl;
    cout << c << endl;
    return 0;
}

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

C++: #include <cstdio>

#define swap(a,b) a^=b^=a^=b
int main(){
    int a=0,b=0,c=0,getin;
    for(int i=0;i<10;i++){
        scanf("%d",&getin);
        if(getin>c) c=getin;
        if(getin>b) swap(b,c);
        if(getin>a) swap(a,b);
    }
    printf("%d\n%d\n%d\n",a,b,c);
    return 0;
}

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

int main()
{
    vector<int> a(10);
    for (int i = 0; i < 10; i++)
    {
        scanf("%d", &a[i]);
    }
    sort(a.begin(), a.end(), greater<int>());
    for (int i = 0; i < 3; i++)
    {
        cout << a[i] << endl;
    }
}

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

int main(){
	int h[10];
	int i,j;
	int t;

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

	for(i=9;i>-1;i--){
		for(j=i-1;j>-1;j--){
			if(h[j]<h[i]){
				t=h[i];
				h[i]=h[j];
				h[j]=t;
			}
		}
	}

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

	return 0;

}

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]);
}