Go: package main

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

var rdr = bufio.NewReaderSize(os.Stdin, 1000000)

func readLine() string {
	buf := make([]byte, 0, 1000000)
	for {
		l, p, e := rdr.ReadLine()
		if e != nil {
			panic(e)
		}
		buf = append(buf, l...)
		if !p {
			break
		}
	}
	return string(buf)
}

func toInt(str string) int {
	n, _ := strconv.Atoi(str)
	return n
}

func main() {
	lst := make([]int, 0)
	for i := 0; i < 10; i++ {
		lst = append(lst, toInt(readLine()))
	}
	sort.Ints(lst)
	for i := 9; i > 6; i-- {
		fmt.Println(lst[i])
	}
}

C++: #include <bits/stdc++.h>
#include <vector>
using namespace std;
int a[100];
int main(){
	for(int i = 1; i <= 10; i++){
		cin >> a[i];
	}
	sort(a+1, a+11);
	cout << a[10] << "\n" << a[9] << "\n" << a[8] << "\n";
	return 0;
}

C++: #include<stdio.h>
#include<math.h>
#include<iostream>
using namespace std;

int main() {
	int i, j, a[10] = {0}, temp;
	for (i = 0; i < 10; i++) {
		cin >> a[i];
	}
	for (i = 0; i < 9; i++) {
		for(j = i + 1; j < 10; j++) {
			if (a[j] < a[i]) {
				temp = a[j];
				a[j] = a[i];
				a[i] = temp;
			}
		}
	}
	for (i = 9; i > 6; i--) {
		cout << a[i] << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
// define
#define int long long
#define UNIQUE(v) v.erase(unique(all(v)), v.end());
#define ZIP(v) sort(all(v)),UNIQUE(v)
#define ADD(a, b) a = (a + b) % mod
#define SUB(a, b) a = (a+mod-b)%mod
#define MUL(a, b) a = (((a)%mod) * ((b)%mod)) % mod
#define repi(i,m,n) for(int i = m;i < n;i++)
#define drep(i,n,m) for(int i = n;i >= m;i--)
#define rep(i,n) repi(i,0,n)
#define rrep(i,n) repi(i,1,n+1)
#define chmin(x,y) x = min(x,y)
#define chmax(x,y) x = max(x,y)
#define all(v) v.begin(),v.end()
#define rall(v) v.rbegin(), v.rend()
#define dmp(x,y) make_pair(x,y)
#define dmt(x, y, z) make_tuple(x, y, z)
#define pb(x) push_back(x)
#define pf(x) push_front(x)
#define fi first
#define se second
// debug
template <typename T, typename U>
ostream &operator<<(ostream &os, const pair<T, U> &p){
  os << "(" << p.first << "," << p.second << ")";return os;
}
template <typename T, typename U, typename V>
ostream &operator<<(ostream &os, const tuple<T, U, V> &t){
  os << "(" << get<0>(t) << "," << get<1>(t) << "," << get<2>(t) << ")";
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v){
  for (auto it = v.begin();it != v.end();++it){
    if(it != v.begin())os << " ";os << *it;
  }return os;
}
template <typename T, typename U>
ostream &operator<<(ostream &os, const map<T, U> &mp){
  for(auto x: mp)os << "(" << x.first << "," << x.second << ")" << endl;
  return os;
}
template<typename T, int SIZE>
int array_length(const T (&)[SIZE]){return SIZE;}
template<typename T, int N>
void PRINTF(const T (&a)[N], int s = N, int t = -1, bool f = true){
	if(t == -1){rep(i,s){if(i)cout << " ";cout << a[i];}}
	else repi(i,s,t){if(i!=s)cout << " ";cout << a[i];}
	if(f)cout << "\n";
}
template<typename T, int N1, int N2>
void PRINTF(const T (&a)[N1][N2], int h = N1, int w = N2){
	rep(i,h){rep(j,w){cout << a[i][j] << " \n"[j==w-1];}}
}
string substr(const string &str, int S1, int S2 = -1){
  if(S2 == -1)return str.substr(S1);
  return str.substr(S1, S2-S1);
}
// typedef
typedef complex<double> Point;
typedef pair<int, int> P;
typedef pair<int, P> PP;
typedef pair<P, int> Pi;
typedef tuple<int, int, int> TT;
typedef pair<int, TT> PT;
typedef vector<int> vi;
typedef deque<int> dq;
const int inf = 1e9+7;
const int INF = 1e18+7;
// int sum = accumulate(a, a+n, 0LL);
// int mx = max_element(a, a+n);
// int mn = min_element(a, a+n);
// int cnt = count(a, a+n, k);


int a[20], c[20], s[20];
int get_rand(int min_rand, int max_rand){
  return rand()%(max_rand-min_rand)+min_rand;
}

signed main(){
  srand((unsigned int)time(NULL));
  int n = 10;
  rep(i,n)s[i] = i;
  rep(i,n)cin >> a[i];
  while(true){
    rep(i,n){
      int tmp = get_rand(i, n);
      swap(s[i], s[tmp]);
    }
    rep(i,n)c[i] = a[s[i]];
    int f = 1;
    rep(i, n-1)if(c[i] < c[i+1])f = 0;
    if(f){
      rep(i,3)cout << a[s[i]] << endl;
      break;
    }
  }
  return 0;
}

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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<ll, ll> P;

#define EACH(i,a) for (auto& i : a)
#define FOR(i,a,b) for (ll i=(a);i<(b);i++)
#define RFOR(i,a,b) for (ll i=(b)-1;i>=(a);i--)
#define REP(i,n) for (ll i=0;i<(n);i++)
#define RREP(i,n) for (ll i=(n)-1;i>=0;i--)
#define debug(x) cout<<#x<<": "<<x<<endl
#define pb push_back
#define ALL(a) (a).begin(),(a).end()

const ll linf = 1e18;
const int inf = 1e9;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
	EACH(x,vec) is >> x;
	return is;
}
template<typename T>
ostream& operator<<(ostream& os, vector<T>& vec) {
	REP(i,vec.size()) {
		if (i) os << " ";
		os << vec[i];
	}
	return os;
}
template<typename T>
ostream& operator<<(ostream& os, vector< vector<T> >& vec) {
	REP(i,vec.size()) {
		if (i) os << endl;
		os << vec[i];
	}
	return os;
}

int main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	vector<int> h(10); cin >> h;
	sort(ALL(h), greater<int>());
	REP(i, 3) cout << h[i] << endl;
}

C++: #include<iostream>

int main(){
	int a[10],b,Ichi=0,Ni=0,San=0,n,i;

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

	for(i=0;i<10;i++){
		if(a[i]>Ichi){
			b=Ichi;
			Ichi=a[i];
			a[i]=b;
		}
		if(a[i]>Ni){
			b=Ni;
			Ni=a[i];
			a[i]=b;
		}
		if(a[i]>San){
			b=San;
			San=a[i];
			a[i]=b;
		}
	}

	std::cout<<Ichi<<std::endl<<Ni<<std::endl<<San<<std::endl;


	return 0;
}

C++: #include<bits/stdc++.h>
#define ll long long 
#define ull unsigned long long 
#define ld long double
#define ui unsigned int 
using namespace std;
int main()
{
	int* arr = new int[10];
	for (int i = 0; i < 10; i++) {
		cin >> arr[i];
	}
	sort(arr, arr + 10,greater<int>());
	cout << arr[0] << endl << arr[1] << endl << arr[2] << endl;
}

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

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

    for(int i=0;i<9;i++){
        for(int j=1;j<10;j++){
            if(moun[i]<moun[j]){
               temp = moun[i];
               moun[i] = moun[j];
               moun[j] = temp;
            }
        }
    }

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

C++: #include<iostream>
using namespace std;
int main() {
	int a[10],min1=-1,min2=-1,min3=-1, i,j,k,l;
	for (i = 1; i <= 10; i++) {
		cin >> a[i];
	}
	for (j = 1; j <= 10; j++) {
		if (a[j] > min1) {
			min1 = a[j];
		}
	}
	for (k = 1; k <= 10; k++) {
		if (a[k] > min2 && a[k]!=min1) {
			min2 = a[k];
		}
	}
	for (l = 1; l <= 10; l++) {
		if (a[l] > min3&&a[l]!=min2&&a[l]!=min1) {
			min3 = a[l];
		}
	}
	cout << min3 << " " << min2 << " " << min1 << " " << endl;
	return 0;
}

C++: /*
 * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001
 */
#include <iostream>
#include <vector>
#define COUNT 10

using namespace	std;

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int sum[10];
  int  i;
  for(i = 0; i < 10 ;i++)
  cin >> sum[i];
  sort(sum+1,sum+10);
  for(i = 9 ; i > 6;i--)
    cout << sum[i] << endl;
    return 0;
  }

C++: #include<iostream>
using namespace std;
int main(){
	int ar[10],r[3],t=10;
	for(int i=0;i<10;i++)
		cin>>ar[i];
	for(int i=0;i<10;i++)
		for(int j=0;j<9;j++)
		if(ar[i]>ar[j]){
			int t;
			t=ar[i];
			ar[i]=ar[j];
			ar[j]=t;
		}
	for(int i=0;i<3;i++)
		cout<<ar[i]<<endl;
	return 0;
}