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>
#include <algorithm>
using namespace std;
int main() {
  int a[10];
  for(int i=0; i<10; i++) {
    cin >> a[i];
  }
  sort(a, a+10, greater<int>());
  for(int i=0; i<3; i++) {
    cout << a[i] << endl;
  }
  return 0;
}

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

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

C++: #include <iostream>

using namespace std;

static const int ARRAY_NUM = 10;

class sort{
private:
	int tmp;
public:
	int* bable(int a[]);
};

int* sort::bable(int a[]){
	for(int i=0;i<ARRAY_NUM;++i){
		for(int j=ARRAY_NUM-1;j>i;--j){
			if(a[j]>a[j-1]){
				tmp    = a[j-1];
				a[j-1] = a[j];
				a[j]   = tmp;
			}
		}
	}
	return a;
}

int main(void){

	//int *array = new int [5];
	sort sort;
	int hgt_mt[10];
	int* hgt_max;

	//cout << "input height of mountain" << endl;

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

	hgt_max = sort.bable(hgt_mt);

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

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int t1,t2,t3,T;
	for(int i;i<10;i++){
		cin>>T;
		if(T>=t1){
			t3=t2;
			t2=t1;
			t1=T;
		}
		else if(T>=t2){
			t3=t2;
			t2=T;
		}
		else if(T>=t3){
			t3=T;
		}
	}
	cout<<t1<<endl<<t2<<endl<<t3;
	return 0;
}

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

using namespace std;

int main(){
  int data[10];
  for(int i=0; i<10; i++)
    scanf("%d",data+i);
  sort(data,data+10,greater<int>());
  for(int i=0; i<3; i++)
    printf("%d\n",data[i]);
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
    vector<int> mountain(10);
    for (int i = 0 ; i < 10 ; i++)
        scanf("%d",&mountain[i]);
    sort(mountain.rbegin(),mountain.rend());
    printf("%d\n%d\n%d\n",mountain[0],mountain[1],mountain[2]);
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
int main(void){
std::vector<int> h;
int tmp;
while(std::cin>>tmp){
h.push_back(tmp);
}

auto p=std::unique(h.begin(),h.end());
std::sort(h.begin(),p);
for(int i=0;i<3;i++){
std::cout<<h[i]<<std::endl;
}
return 0;
}

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

int main()
{
	set <int> s;
	set<int>::iterator si;
	for (int i = 0; i < 10; i++){
		int h;
		cin >> h;
		s.insert(h * (-1));
	}

	si = s.begin();
	for (int i = 0; i < 3;i++){
		cout << *si * (-1)<< endl;
		si++;
	}
	

	return 0;
}

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

int main(){

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

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

  for(int i = 9; i > 6;i--){
    cout << array[i] << endl;
  }

  return 0;
}

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

int main(){
	int a[10];
	for (int i = 0; i < 10; i++){
		scanf("%d", &a[i]);
	}
	sort(a, a + 10);
	printf("%d\n", a[9]);
	printf("%d\n", a[8]);
	printf("%d\n", a[7]);
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,b,c,i,x;
    a =0;
    b =0;
    c =0;
    for (int n=0;n<10;n++){
        cin >> i;
        if (c < i)
            c = i;
        if (b < c){
            x = b;
            b = c;
            c = x;
        }
        if (a < b){
            x = a;
            a = b;
            b = x;
        }

    }
    cout << a << endl << b << endl << c << endl;
}

C++: #include <stdio.h>
int main(void) {
	int d,m1,m2,m3,i;
	for(i=0;i<=10;i++){
	scanf("%d",&d);
	if(d>m1){
		m3=m2;
		m2=m1;
		m1=d;
	}else if(d>m2){
		m3=m2;
		m2=d;
	}else if(d>m3){
		m3=d;
	}
}
	printf("%d\n",m1);
	printf("%d\n",m2);
	printf("%d\n",m3);
	return 0;
}

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

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

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

int main()
{
	set<int> s;
	for(int i=0;i<10;i++){
		int in;
		cin >> in;
		s.insert(in);
	}
	
	set<int>::iterator it = s.end();
	--it;
	for(int i=0;i<3;i++){
		cout << *it << endl;
		--it;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define r(i,n) for(int i=0;i<n;i++)
using namespace std;

struct PrimalDual{
  const int INF = 1<<28;
  typedef pair<int,int> P;
  struct edge{
    int to,cap,cost,rev;
    edge(){}
    edge(int to,int cap,int cost,int rev):to(to),cap(cap),cost(cost),rev(rev){}
  };

  int n;
  vector<vector<edge> > G;
  vector<int> h,dist,prevv,preve;

  PrimalDual(){}
  PrimalDual(int sz):n(sz),G(sz),h(sz),dist(sz),prevv(sz),preve(sz){}
  
  void add_edge(int from,int to,int cap,int cost){
    G[from].push_back(edge(to,cap,cost,G[to].size()));
    G[to].push_back(edge(from,0,-cost,G[from].size()-1));
  }

  int flow(int s,int t,int f){
    int res=0;
    fill(h.begin(),h.end(),0);
    while(f>0){
      priority_queue<P,vector<P>,greater<P> > que;
      fill(dist.begin(),dist.end(),INF);
      dist[s]=0;
      que.push(P(0,s));
      while(!que.empty()){
        P p=que.top();que.pop();
        int v=p.second;
        if(dist[v]<p.first) continue;
        for(int i=0;i<(int)G[v].size();i++){
          edge &e=G[v][i];
          if(e.cap>0&&dist[e.to]>dist[v]+e.cost+h[v]-h[e.to]){
            dist[e.to]=dist[v]+e.cost+h[v]-h[e.to];
            prevv[e.to]=v;
            preve[e.to]=i;
            que.push(P(dist[e.to],e.to));
          }
        }
      }
      if(dist[t]==INF) return -1;
      for(int v=0;v<n;v++) h[v]+=dist[v];
      int d=f;
      for(int v=t;v!=s;v=prevv[v]){
        d=min(d,G[prevv[v]][preve[v]].cap);
      }
      f-=d;
      res+=d*h[t];
      for(int v=t;v!=s;v=prevv[v]){
        edge &e=G[prevv[v]][preve[v]];
        e.cap-=d;
        G[v][e.rev].cap+=d;
      }
    }
    return res;
  }
};

int main(){
  vector<int>v;
  int x;
  while(cin>>x){
    v.push_back(x);
  }
  sort(v.begin(),v.end(),greater<int>());
  std::vector<int> g;
  r(i,min((int)v.size(),100))g.push_back(v[i]);
  int n=g.size();
  PrimalDual p(n+3);
  r(i,n)p.add_edge(n,i,1,0);
  r(i,n)p.add_edge(i,n+1,1,-g[i]);
  p.add_edge(n+1,n+2,3,0);
  p.flow(n,n+2,3);
  r(i,n){
    r(j,p.G[i].size()){
      if(p.G[i][j].to==n+1&&p.G[i][j].cap==0){
        cout<<p.G[i][j].cost*-1<<endl;
      }
    }
  }
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
using namespace std;
main() {
  int a[10];
  for(int i=0;i<10;i++) scanf("%d",&a[i]);
  sort(a,a+10,greater<int>());
  printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
}