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 <stdio.h>
#include <stdlib.h>
#define MAXN 10
typedef struct DNode
{
  int data;
  DNode *next;	
}llist;
void creatlist(llist*&head,int a[],int n)
{
	llist *pre,*q;
	head=(llist *)malloc(sizeof(llist));
	pre=head;
	for(int i=1;i<=n;i++)
	{
	 q=(llist *)malloc(sizeof(llist));
	 q->data=a[i];
     pre->next=q;
     pre=q; 
	}
	pre->next=NULL;
}
void swapi(llist*&L)
{
 llist *q,*p;
 q=L->next;
 p=L->next->next;
 q->next=NULL;
 L->next=p;
 q->next=p->next;
 p->next=q;  	
}

bool sorti(llist*&L)
{
  llist *p,*q;
  p=L->next;
  q=L;
  int count=0,c2;
  while(p->next!=NULL)
  {
   count++;
   p=p->next;	
  }
  c2=count;
  if(L->next->next==NULL&&L->next==NULL)
  return 0;
  else
  {
  	while(count--)
  	{
  		c2=count+1;
 	  while(c2--)
 	  {
  	 	if(q->next->data<q->next->next->data)
  	 	swapi(q);
		q=q->next; 	
  	  }
  	   q=L;
    }
  }	
}
int main()
{
    int a[MAXN];
    llist *p;
    for(int i=1;i<=MAXN;i++)
    scanf("%d",&a[i]);
    creatlist(p,a,MAXN);
    sorti(p);
    for(int i=1;i<=3;i++)
    {
      p=p->next;
   	  printf("%d\n",p->data);
    }  
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
int main() {
	int n;
	std::vector<int> vec;
	for (int i = 0; i < 10; i++) {
		std::cin >> n;
		vec.emplace_back(n);
	}
	std::sort(vec.begin(), vec.end());
	for (int i = 9; i > 6; i--) {
		std::cout << vec[i] << std::endl;
	}
}

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

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

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

int main(){

	int hill[]={0,0,0,0,0,0,0,0,0,0};

	for(int j=0;j<=9;j++){
		scanf("%d",&hill[j]);
	}

	int key;

	//sort
	for(key=9;key>=0;key--){

		for(int i=0;i<=key;i++){
			if(hill[i]>hill[i+1]){
				swap(hill[i],hill[i+1]);
			}
		}

	}

	printf("%d%d%d",hill[9],hill[8],hill[7]);

	return 0;

}

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

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

    sort(h.begin(),h.end(), greater<int>() );
    cout << h[0]<<endl;
    cout << h[1]<<endl;
    cout << h[2]<<endl;

    return 0;
}

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

#define BOGO 10

using namespace std;

int main()
{
	int arr[BOGO];
	bool found;
	int j;
	srand(static_cast<unsigned int>(time(NULL)));
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		
		/**
		for(int j = 0; j < BOGO; j++){
			cout << arr[j] << flush;
		}
		cout << endl;
		/**/
		
		found = true;
		for(j = 0; j < BOGO-1; j++){
			if(arr[j] > arr[j+1]){
				found = false;
				break;
			}
		}
		
		if(found){
			break;
		}
		random_shuffle(arr, arr+BOGO);
	}
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

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

int main() {
	vector<int> v(10);
	for (int i = 0; i < 10; i++) {
		cin >> v.at(i);
	}

	sort(v.begin(), v.end());
	reverse(v.begin(), v.end());
	for (int i = 0; i < 3; i++) {
		cout << v.at(i) << endl;
	}
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <set>

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,j) FOR(i,0,j)
#define mp std::make_pair

typedef long long ll;
typedef unsigned long long ull;
typedef std::pair<int,int> P;
typedef std::pair<int,P> State;

const int INF = 1001001001;

// S N E W(南北東西)
const int dx[8] = {0, 0, 1, -1, 1, 1, -1, -1}, dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};

const int MAX_N = 5;

class IntervalHeap{
public:
    IntervalHeap()
        :size(1), next(0){
        for(int i=1;i<=MAX_N;i++){
            data[i][0] = 0;
            data[i][1] = 0;
        }
    }
    IntervalHeap(int n){
        for(int i=1;i<=(n+1)/2;i++){
            data[i][0] = 0;
            data[i][1] = 0;
        }
    }
    void insert(int v){
        if(next == 1){
            data[size][1] = v;
            if(data[size][0] > data[size][1]){
                std::swap(data[size][0], data[size][1]);
                heapUp(size, 0);
            }else{
                heapUp(size, 1);
            }
        }else{
            data[size][0] = v;
            data[size][1] = v;
            if(data[size][0] < data[size/2][0]){
                heapUp(size, 0);
                data[size][1] = data[size][0];
            }
            if(data[size][1] > data[size/2][1]){
                heapUp(size, 1);
                data[size][0] = data[size][1];
            }
        }
        
        if(next == 1){++size;}
        next ^= 1;
    }
    void deleteMin(){
        if(isEmpty()){return;}
        next ^= 1;
        
        if(next == 1){
            --size;
        }else{
            data[size][1] = data[size][0];
        }
        data[1][0] = data[size][next];
        heapDown(1, 0);
    }
    void deleteMax(){
        if(isEmpty()){return;}
        if(size == 2 && next == 0){data[1][1] = data[1][0]; size = 1; next = 1; return;}
        next ^= 1;
        
        if(next == 1){
            --size;
        }else{
            data[size][1] = data[size][0];
        }
        data[1][1] = data[size][next];
        heapDown(1, 1);
    }
    int min(){
        if(isEmpty()){} // Error
        return data[1][0];
    }
    int max(){
        if(isEmpty()){} // Error
        return data[1][1];
    }
    bool isEmpty(){
        return size == 1 && next == 0;
    }
private:
    void heapUp(int index, int flag){
        if(index == 1){return;}
        
        if(flag ^ (data[index][flag] < data[index/2][flag])){
            std::swap(data[index][flag], data[index/2][flag]);
            heapUp(index/2, flag);
        }
    }
    void heapDown(int index, int flag){
        int child = index * 2;
        if(child >= size+next){return;}
        
        if(child+1 < size+next && flag ^ (data[child][flag] > data[child+1][flag])){++child;}
        if(flag ^ (data[child][flag] < data[index][flag])){
            std::swap(data[child][flag], data[index][flag]);
            if(data[child][0] > data[child][1]){std::swap(data[child][0], data[child][1]);}
            heapDown(child, flag);
        }
    }
    int data[MAX_N+1][2];
    int size, next;
};

IntervalHeap ih;

int main(){
    REP(i, 10){
        int n;
        std::cin >> n;
        ih.insert(n);
    }

    REP(i, 3){
        std::cout << ih.max() << std::endl;
        ih.deleteMax();
    }
}

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

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

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

int main(){
    int height[10];
    int i;
    for( i = 0; i < 10; i++){
        cin >> height[i];
    }
    for( i = 0; i < 10; i++){
        sort(height, height + 10);
    }
    for( i = 0; i < 3; i++){
        cout << height[i] << endl;
    }
    return 0;
}