Go: package main

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

func getsAsIntArray() (line []int) {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		str := scanner.Text()
		if str == "" {
			break
		}
		data, err := strconv.Atoi(str)
		if err != nil {
			break
		}
		line = append(line, data)
	}

	return
}

func main() {

	lines := getsAsIntArray()
	sort.Sort(sort.Reverse(sort.IntSlice(lines)))
	for i, v := range lines {
		if i < 3 {
			fmt.Println(v)
		}
	}
}

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

// Macro and Macro Functions
#define rep(a, b) for(int a = 0; a < b; ++a)
#define REP(a, b, c) for(int a = b; a < c; ++a)
#define drep(a, b, c) for(int a=0,b=0;b<c?:(b=0,++a<c);++b)
#define int long long
#define between(n,_min,_max) if(_min<=n&&n<=_max)
#define SORT(a) sort(ALL(a))
#define RSORT(a) sort(RALL(a))
#define REVERSE(a) reverse(ALL(a))
#define MOD 1000000007
#define ALL(a) a.begin(),a.end()
#define RALL(a) a.rbegin(),a.rend()
#define ALLIN(a) rep(nanika,a.size()) cin>>a[nanika]
#define ALLINDE(a) rep(kyawa,a.size()){cin>>a[kyawa]; --a[kyawa];}
#define YN(a) do{if(a) cout<<"YES"; else cout<<"NO";}while(0)
#define Yn(a) do{if(a) cout<<"Yes"; else cout<<"No";}while(0)
#define yn(a) do{if(a) cout<<"yes"; else cout<<"no";}while(0)
#define spa " "
#define dspa "  "
#define ctoi(c) (c)-'0'
#define altoi(a) (a)-'a'
#define fi first
#define se second
#define dvec(type,name,row,column,value) vector<vector<type>> name(row,vector<type>(column,value))
 
// List of using
using ll   = signed long long;
using ull  = unsigned long long;
using pint = pair<int,  int>;
using pong = pair<long, long>;
using tint = tuple<int,  int,  int>;
using tong = tuple<long, long, long>;
using vint = vector<int>;
using vll  = vector<long long>;
using vbol = vector<bool>;
using vstr = vector<string>;
using vull = vector<unsigned long long>;
using dvin = vector<vector<int>>;
using dvbo = vector<vector<bool>>;
using mint = map<int,int>;
 
// Common Variable
bool DEBUG=false;
long long INF=2000000000;

void print(){
  cout<<'\n';
}

template<class HEAD,class... TAIL>
void print(HEAD&& head,TAIL&&... tail){
  cout<<head<<spa;
  print(forward<TAIL>(tail)...);
}

void scan(){}

template<class HEAD,class... TAIL>
void scan(HEAD&& head,TAIL&&... tail){
  cin>>head;
  scan(forward<TAIL>(tail)...);
}

template<typename t>
void print(vector<t> &v){
  rep(i,v.size()){
    cout<<v[i]<<spa;
  }
  cout<<endl;
}

template<typename t, typename u>
void print(vector<pair<t,u>> &v){
  rep(i,v.size()){
    cout<<i<<" : "<<v[i].first<<" "<<v[i].second<<endl;
  }
}

int RepeatSquaring(int N, int P, int M){
  if(P==0) return 1;
  if(P%2==0){
    int t = RepeatSquaring(N, P/2, M);
    return t*t % M;
  }
  return N * RepeatSquaring(N, P-1, M);
}
//--------------------------------
// Template Place
struct edge{int to; ull cost;};
 
class uc_graph{
  public :
    int size;
    vector<vector<edge>> graph;
    vector<ull> dis;
    vector<int> prev;
    vector<bool> used;
    int min_prim;
    
    void set(int n){
      size=n;
      graph.resize(size);
      dis.resize(size);
      prev.resize(size);
      used.resize(size);
    }
    void dijkstra(int s){
      priority_queue<pair<ull,int>,vector<pair<ull,int>>,greater<pair<ull,int>>> que;
      fill(dis.begin(),dis.end(),INF);
      fill(prev.begin(),prev.end(),-1);
      dis[s]=0;
      que.push(pair<ull,int>(0,s));
      
      while(!que.empty()){
        pair<ull,int> p=que.top();
        que.pop();
        int v=p.second;
        if(dis[v]<p.first) continue;
        rep(i,graph[v].size()){
          edge e=graph[v][i];
          if(dis[e.to]>dis[v]+e.cost){
            dis[e.to]=dis[v]+e.cost;
            que.push(pair<ull,int>(dis[e.to],e.to));
            prev[e.to]=v;
          }
        }
      }
    }
    void prim(void){
      priority_queue<pint,vector<pint>,greater<pint>> que;
      fill(ALL(used),false);
      que.push(pint(0,0));
      min_prim=0;
      while(!que.empty()){
        int c=que.top().first,v=que.top().second;
        que.pop();
        if(used[v]) continue;
        used[v]=true;
        min_prim+=c;
        rep(i,graph[v].size()){
          que.push(pint(graph[v][i].cost,graph[v][i].to));
        }
      }
    }
    vint get_path(int t){
      vint path;
      for(;t!=-1;t=prev[t])
        path.push_back(t);
      reverse(path.begin(),path.end());
      return path;
    }
};
//--------------------------------
// int dx[]={ 1, 0,-1, 0};
// int dy[]={ 0,-1, 0, 1};

signed main(){
  vint h(10); ALLIN(h);
  RSORT(h);
  rep(i,3) cout<<h[i]<<endl;
}

C++: #include <iostream>
#include<string>
#include<cmath>
#include<algorithm>
#include<cctype>
#include<queue>
#include<stack>
#include<stdio.h>
#include<vector>
#include<set>
#include<map>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++)
typedef int long long ll;

using namespace std;
int main(){

    vector<int> v(10);
    rep(i,10){
        int x;
        cin>>x;
        v[i]=x;
    }
    sort(v.begin(),v.end(),greater<int>());
    cout<<v[0]<<endl<<v[1]<<endl<<v[2]<<endl;





return 0;
}

C++: #include<stdio.h>

int main() {
  int h[3] = {-1, -1, -1},t,s;
  for(int i=0; i<10; ++i) {
    scanf("%d", &t);
    for(int j=0; j<3; ++j) {
      if(h[j] < t) {
	s = h[j];
	h[j] = t;
	t = s;
      }
    }
  }

  for(int i=0; i<3; ++i) printf("%d\n", h[i]);
}

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

int main(){
	int top[3]={0,0,0},cur;
	for (int i = 0; i < 10; i++)
	{
		cin>>cur;
		if(cur>top[0]){
			top[2]=top[1];
			top[1]=top[0];
			top[0]=cur;
		}else if(cur>top[1]){
			top[2]=top[1];
			top[1]=cur;
		}else if(cur>top[3]){
			top[2]=cur;
		}
	}
}

C++: #include <iostream>
#include <algorithm>
#define REP(i,n) for(int i=0;i<n;i++)
using namespace std;

int main(){
  int high[10];
  REP(i,10){
    cin >> high[i];
  }
  sort(high,high+10);
  cout << high[9] << endl;
  cout << high[8] << endl;
  cout << high[7] << endl;
}

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

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

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

using namespace std;

int num[10];

int cmp(const void *a, const void *b) {
	return *(int *)b - *(int *)a; 
}

int main() {
	while (scanf("%d", &num[0]) != EOF) {
		for (int i=1; i<10; ++i) scanf ("%d", &num[i]);
		qsort(num, 10, sizeof(int), cmp);
		printf ("%d\n%d\n%d\n", num[0], num[1], num[2]);
	}
	return 0;
}

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

using namespace std;

int main() {
	array<int, 10> input;
	for(auto& i : input)
		cin >> i;
	sort(input.begin(), input.end(), greater<int>());
		cout << input[0] << endl
			 << input[1] << endl
			 << input[2] << endl;;
	return 0;
}

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

int main() {
	int 1st, 2nd, 3rd;
	1st=0;
	2nd=0;
	3rd=0;
	int i;
	for(i=1;i<=10;i++){
		if(height of mountain i > 3rd){
			if(height of mountain i > 2nd){
				if(height of mountain i > 1st){
					1st=i;
				}else{
					2nd=i;
				}
			}else{
				3rd=i;
			}
		}
	}
	cout << 1st << endl;
	cout << 2nd << endl;
	cout << 3rd << endl;
	return 0;
}

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

using namespace std;

int main() {
	int mountain[10];
	int m_max[3];
	int MAX;
	int count = 0;
	int n;

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

	MAX = mountain[0];

	while(count != 3){

		for(int i = 0; i < 10; i++) {
			if(MAX < mountain[i]) {
				MAX = mountain[i];
				n = i;
			}
		}

		m_max[count] = MAX;
		count++;
		mountain[n] = 0;
		MAX = 0;

	}

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

}