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<cstdio>
#include<iostream>
using namespace std;
int a[11];
int main()
{
	int i,max1=-1,max2=-1,max3=-1;
	for(i=1;i<=10;i++)
	{
		cin>>a[i];
		if(a[i]>max1){max3=max2;max2=max1;max1=a[i];}
		else if(a[i]>max2){max3=max2;max2=a[i];}
		else if(a[i]>max3)max3=a[i];
	}
	cout<<max1<<endl<<max2<<endl<<max3;
	return 0;
}

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

using namespace std;

const int numOfMountain = 10;

int main(int argc, char** argv){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

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

    vector<int>::iterator out = mountains.end();
    for(int i = 0; i < 3; i++) {
        cout << *--out << endl;
    }

    return 0;
}

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

int main(){
    int i,max=-1,max_1=-1,max_2=-1,a;
    for(i=0;i<=9;i++){
        cin >> a;
        if(a>max){
            max_2=max_1;
            max_1=max;
            max=a;
        }
        else if(a>max_1){
            max_2=max_1;
            max_1=a;
        }
        else if(a>max_2){
            max_2=a;
        }
    }
    cout << max << endl << max_1 << endl << max_2 << endl;
}

C++: #include <iostream>

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

  return 0;
}

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

using namespace std;

int main(void){
	int count = 0;
	set<int, greater<int> > nums;
	for (int i=0; i<10; ++i){
		int num;
		cin >> num;
		nums.insert(num);
	}
	set<int, greater<int> >::iterator it = nums.begin();
	while (it != nums.end() && (n<3)){
		cout << *it << endl;
		++it;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int n , mountain[11] ;
    for( int i=0 ; i<10 ; i++ )
        cin >> mountain[i] ;
    for( int i=0 ; i<10 ; i++ ){
        for( int j=i+1 ; j<10 ; j++ ){
            if( mountain[i] > mountain[j] )
                swap( mountain[i] , mountain[j] );
        }
    }
    cout << mountain[9] << endl << mountain[8] <<endl << mountain[7] << endl;
}

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

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

	return 0;
}

C++: #include <cstdio>
#include <vector>
#define MAX 10
using namespace std;

vector<int> sort(vector<int> &array);

int main(){
	vector<int> array;
	int n;
	
	for(int i = 0; i < MAX; i++){
		scanf("%d", &n);
		array.push_back(n);
	}
	
	sort(array);
	
	for(int i = 0; i < 3; i++){
		printf("%d\n", array[i]);
	}
	return 0;
}

vector<int> sort(vector<int> &array){
    int temp = 0;
    for(int i = 0; i < array.size(); i++){
        for(int j = 0; j < array.size() - i - 1; j++){
            if(array[j] < array[j + 1]){
                temp = array[j];
                array[j] = array[j + 1];
                array[j + 1] = temp;
            }
        }
    }
    return array;
}

C++: #include<stdio.h>
int main(void) {
	int c[12],top=0,second=0,thread=0;
	for (int i = 1; i <= 10; i++)
	{
		scanf("%d", &c[i]);
		if (c[i]>top)
		{
			second = top;
			top = c[i];
		}
		else
		{
			if (c[i]>second)
			{
				thread = second;
				second = c[i];
			}
			else
			{
				if (c[i]>thread)
				{
					thread = c[i];
				}
			}
		}
	}
	printf("%d\n%d\n%d\n", top, second, thread);
	return 0;
}

C++: #include <stdio.h>

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

C++: #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0; i<(int)(n); i++)
#define intt int64_t
#define all(vec) vec.begin(), vec.end()

int main() {
    vector<int> vec(10);
    rep(i,10) scanf("%d", &vec.at(i));
    sort(all(vec), greater<>());
    rep(i,3) printf("%d\n", vec.at(i));
}

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

typedef long int lint;
typedef long long int llint;
typedef pair<int, int> pii;
typedef pair<int, string> pis;
typedef pair<long, long> pll;

#define EACH(t, c) for (auto&& t : c)
#define ALL(c) begin(c), end(c)
#define FOR(i, s, e) for (int i = (s); i < (int)(e); ++i)
#define REP(i, n) FOR(i, 0, n)
#define endl '\n'
#define fk first
#define sv second

const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
const int MOD = (int)1e9 + 7;
const int INF = 999999999;

template<typename T>
void print(const std::vector<T>& v, char sep=' ') {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i != 0) cout << sep;
    cout << v[i];
  }
  cout << endl;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a[10];

  REP(i, 10) {
    cin >> a[i];
  }
  sort(ALL(a));

  REP(i, 3) {
    cout << a[9 - i] << endl;
  }
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
vector<int> height;
int a;
while(cin>>a){
height.push_back(a);
}
sort(height.begin(), height.end(), greater<int>());
for(int i = 0; i < 3; i++)
cout << height[i] << endl;
}

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

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

    for(int i = 0; i < 3; i++){
      cout << mountain.at(i) <<endl;
    }
}

C++: #include "bits/stdc++.h"
#include<unordered_map>
#include<unordered_set>
#pragma warning(disable:4996)
using namespace std;
using ld = long double;
template<class T>
using Table = vector<vector<T>>;


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

C++: //
//  main.cpp
//  kyougi
//
//  Created by 寺林 一旭 on 2018/08/27.
//  Copyright © 2018年 寺林 一旭. All rights reserved.
//

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
 
    int num;
    vector<int> list;
    while(cin)
    {
    cin >> num;
        list.push_back(num);
   
    }
    sort(list.begin(), list.end(), greater<int>());
    for(int i = 0 ; i< 3 ; i++)
    {
        cout<< list[i] <<endl;
    }
    
    
    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];
	int t=90000;
	for(int i=t;i;i--){
		for(int j=i;j;j--){
			if(i+j==2)sort(a,a+10);
		}
	}
	for(int i=9;i>6;i--)cout<<a[i]<<endl;
	return 0;
}