Go: package main

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

var maxint = 10000
var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	scanner.Scan()
	return strconv.Atoi(scanner.Text())
}

func main() {
	scanner.Split(bufio.ScanWords)
	arr := make([]int, 10)
	for i := range arr {
		n, _ := nextInt()
		arr[i] = n
	}

	sort.Slice(arr, func(i, j int) bool {
		return arr[i] >= arr[j]
	})

	arrStr := fmt.Sprintf("%+v", arr[0:3])
	arrStr = arrStr[1:(len(arrStr) - 1)]
	arrStr = strings.Replace(arrStr, " ", "\n", -1)
	fmt.Println(arrStr)
}

C++: #define D(x) cout << #x " = " << x << endl
#define DD(x, y) cout << "(" #x ", " #y ") = (" << x << ", " << y << ")" << endl
#define DDD(x, y, z) cout << "(" #x ", " #y ", " #z ") = (" << x << ", " << y << ", " << z << ")" << endl
#define DV(v) for (auto __macro_vi : v){ cout << __macro_vi << " ";} cout << endl;
#define DA(a, n) for (int __macro_i = 0; __macro_i < n; ++__macro_i) { cout << a[__macro_i] << " "; } cout << endl;
#define REP(i, n) for (int i = 0; i < n; ++i)
#define ALL(v) (v).begin(), (v).end()
#include<iostream>
#include<vector>
#include<cassert>
#include<cmath>
#include<algorithm>
using namespace std;

int h[10];
int main()
{
for (int i = 0 ; i < 10; ++i) {
    cin >> h[i];
}
sort(h, h + 10, greater<int>());
cout << h[0] << endl;
cout << h[1] << endl;
cout << h[2] << endl;
}

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

int main(){

int h[10];
int rank[10];

for(int i=0;i<10;i++){
	scanf("%d",&h[i]);
}

for(int i=0;i<10;i++){
	int label=0;
	for(int j=0;j<10;j++){
		if(h[i]<h[j])
			label+=1;
	}
	rank[label]=h[i];
}

printf("%d\n%d\n%d\n",rank[0],rank[1],rank[2]);

return 0;		
}

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

using namespace std;

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

	sort(h, h + 10);
	reverse(h, h + 10);
	cout << h[0] << endl << h[1] << endl << h[2] << endl;
}

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

int main(){
	priority_queue<int> que;
	int a;
	for(int i=1;i<=10;i++){
		cin>>a;
		que.push(a);
	}
	for(int i=1;i<=3;i++){
		cout<<que.top()<<endl;
		que.pop();
	}
	return 0;
}

C++: #include <stdio.h>
#define DATAS 10

int main(void){
    int height[DATAS], tmp, minID;

    // input
    for (int i=0; i<DATAS; i++){
        scanf("%d", &height[i]);
    }
    // sort
    for (int i=0; i<DATAS; i++){
        minID = i;
        for (int j=i; j<DATAS; j++){
            if (height[j]<height[minID]) minID=j;
        }
        tmp = height[i];
        height[i] = height[minID];
        height[minID] = tmp;
    }

    for (int i=0; i<3; i++){
        printf("%d\n", height[DATAS-1-i]);
    }
   return 0;
}

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

#define SIZE 10
#define MAX 10000
#define TOP 3

using namespace std;

int main() {
 int i = 0;
 int height[SIZE];
 char buf[256];

 while(i < SIZE) {
  scanf("%s",buf);

  if(atoi(buf) != 0) {
   if(atoi(buf) <= MAX) {
    height[i] = atoi(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<algorithm>
using namespace std;
int main(){
	int n[10],i,j;
	for(i=0;i<10;i++){
	cin>>n[i];
	}
	sort(n,n+10);
	for(i=10;i>7;i--){
		cout<<n[i-1]<<endl;
	}
return 0;
}

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

using namespace std;

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

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

using namespace std;

int main(){
	int i;
	int t[10];
	for(i=0;i<10;i++) scanf("%d", t+i);

	sort(t, t+10);
	printf("%d\n%d\n%d\n", t[9], t[8], t[7]);
}

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

using namespace std;

int main (int argc, char * const argv[]) {
    // insert code here...
    int h;
	int yama[10];
	for(int i=0;i<10;i++){
		cin >> h;
		yama[i]=h;
	}
	sort(yama, yama+10);
	
	cout << yama[9] <<endl;
	cout << yama[8] <<endl;
	cout << yama[7] <<endl;
	return 0;
}

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

int main(){
    vector<int> h(10) ;
    for(int i=0;i<10;i++) cin >> h.at(i) ;
    sort(h.begin(),h.end()) ;
    reverse(h.begin(),h.end()) ;
    for(int i=0;i<3;i++){
        cout << h.at(i) << endl ;
    }
}

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

#define REP(i, s, n) for(int i = s; i < n; ++i)
#define rep(i, n)		 REP(i, 0, n)
#define SORT(c)			 sort((c).begin(), (c).end())
#define IINF					INT_MAX
#define LLINF					LLONG_MAX
#define DEBUG					false

int main(){
    vector<int> mountain(10);
    rep(i,10){
        cin>>mountain[i];
    }
    sort(mountain.begin(),mountain.end());
    for(int i=9;i>=7;i--){
        cout<<mountain[i]<<endl;
    }       
}

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

int main()
{
	int h[10] = {}, i = 0, n[3] = {};
	while (cin >> h[i++]) {
		if (h[i] > h[n[0]]) {
			n[2] = n[1];
			n[1] = n[0];
			n[0] = i;
		}
		else if (h[i] > h[n[1]]) {
			n[2] = n[1];
			n[1] = i;
		}
		else if (h[i] > h[n[2]]) {
			n[2] = i;
		}
	}
	for (int j = 0; j < 3; j++) {
		cout << h[n[j]] << endl;
	}
    return 0;
}

C++: #include "bits/stdc++.h"
using namespace std;
#define repi(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)
#define rep(i,n) repi(i,0,n)
#define repi_(i,a,b) for(int i=(a), i##_len=(b); i<=i##_len; ++i)
#define rep_(i,n) repi_(i,0,n)
#define all(x) (x).begin(),(x).end()
#define vsort(v) sort((v).begin(), (v).end())
#define gsort(v) tsort(v); reverse((v).begin(), (v).end())
#define vrev(v) reverse((v).begin(), (v).end())
#define siz(v) ((int)(v).size())
#define ers(v, n) (v).erase((v).begin() + n)
#define cnt(v, n) count(all(v), n)
#define vmin(v) *min_element(v.begin(), v.end())
#define vmax(v) *max_element(v.begin(), v.end())
#define el "\n"
#define co(x) cout<<(x)<<el
#define coc(c, a, b) if(c)co((a));else co((b))
#define cosp(x) cout<<(x)<<' '
#define YES(c) coc(c,"YES", "NO")
#define Yes(c) coc(c,"Yes", "No")
#define yes(c) coc(c,"yes", "no")
#define POSSIBLE(c) coc(c, "POSSIBLE", "IMPOSSIBLE")
#define Possible(c) coc(c, "Possible", "Impossible")
#define possible(c) coc(c, "possible", "impossible")
#define inf INT_MAX
#ifdef tqktmp_2
#define gc() getchar(); getchar()
#else
#define gc() 1
#endif
const unsigned int bf0 = (1 << 0);
const unsigned int bf1 = (1 << 1);
const unsigned int bf2 = (1 << 2);
const unsigned int bf3 = (1 << 3);
const unsigned int bf4 = (1 << 4);
const unsigned int bf5 = (1 << 5);
const unsigned int bf6 = (1 << 6);
const unsigned int bf7 = (1 << 7);

typedef long long lint;
typedef vector<int> ivec; typedef vector<string> svec;

lint dx[8] = { 0,1,1,1,0,-1,-1,-1 },
dy[8] = { 1,1,0,-1,-1,-1,0,1 };

template<class T>inline bool maxi(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>inline bool mini(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }




int main() {
	cin.tie(0);
	ios::sync_with_stdio(0);

	lint a[10];
	rep(i, 10)cin >> a[i];
	sort(a, a + 10);
	rep(i, 3)co(a[9 - i]);
	gc();
}

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

int main()
{
int a[10];
int b[10];
for(int i=0;i++;i<10)
{
cin>>a[i];
for(int j=0;j++;j<10)
{
if(a[i]>b[j])
{
for(int k=10-j;k--;k>0)
{
b[j+k]=b[j+k-1];
}
b[j]=a[i];
break;
}
}
}
for(int n=0;n++;n<3)
{
cout<<b[n];
}
}

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

int main() {
  int N ;
  vector<int>Mountain(N);
  for(int i = 0; i < N; i++){
    cin >> Mountain(i);
  }
  sort(Mountain.begin(), Mountain.endl());

  for(int j = 0; j < 3; j++){
    cout << Mountain(j) << endl;
  }
    }
  }
}