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 <iostream>
#include <vector>
#include <algorithm>
#include <functional>

int main() {
    return ([]() {
        std::function<void()> input;
        std::vector <int> list;
        (input = [&input, &list]() {
            int data;
            if ( std::cin >> data ) {
                list.push_back( data );
                input();
            }
        })();
        ([&list]() {
            sort( list.rbegin(), list.rend() );
            for_each( list.begin(), list.begin() + 3, [](int x){ std::cout << x << std::endl; } );
        })();
        return 0;
    })();
}

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<bits/stdc++.h>
/*#include<iostream>
#include<stdio.h>
#include<ctype.h>
#include<string.h>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<climits>*/
#define rep(i,a,b) for(int i=a;i<(b);++i)
#define rep1(i,a,b) for(int i=a;i<=(b);++i)
#define per(i,a,b) for(int i=a;i>(b);--i)
#define per1(i,a,b) for(int i=a;i>=(b);--i)
#define LL long long
#define inf 0x7f7f7f7f
#define N 10010
using namespace std;
int a[N];
bool cmp(int a,int b)
{
    return a>b;
}
int main()
{
    int i=0;
    while(~scanf("%d",&a[i++]));
    sort(a,a+i-1,cmp);
    printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
int main(){
	vector<int> heights;
	for (int i = 0; i < 10; ++i) {
		int h;
		cin >> h;
		heights.push_back(h);
	}

	sort(heights.begin(), heights.end(), std::greater<int>());
	for (int i = 0; i < 3; ++i) {
		cout << heights[i] << "\n";
	}
    return 0;
}

C++: #include<stdio.h>

int a,b,c,d,e,f,g,h,i,j,X;

 int main()
{
	scanf("%d %d %d %d %d %d %d %d %d %d",a,b,c,d,e,f,g,h,i,j);
		if(a>b)
		{
			X=a;
			a=b;
			b=X;
		}
	if(b>c)
	{	X=b;
		b=c;
		c=X; }
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
	if(e>f)
	{	X=e;
		e=f;
		f=X;}
	if(f>g)
	{	X=f;
		f=g;
		g=X;}
	if(g>h)
	{	X=g;
		g=h;
		h=X;}
	if(h>i)
	{	X=h;
		h=i;
		i=X;}
	if(i>j)
	{	X=i;
		i=j;
		j=X;  }
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
	if(e>f)
	{	X=e;
		e=f;
		f=X;}
	if(f>g)
	{	X=f;
		f=g;
		g=X;}
	if(g>h)
	{	X=g;
		g=h;
		h=X;}
	if(h>i)
	{	X=h;
		h=i;
		i=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
	if(e>f)
	{	X=e;
		e=f;
		f=X;}
	if(f>g)
	{	X=f;
		f=g;
		g=X;}
	if(g>h)
	{	X=g;
		g=h;
		h=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
	if(e>f)
	{	X=e;
		e=f;
		f=X;}
	if(f>g)
	{	X=f;
		f=g;
		g=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
	if(e>f)
	{	X=e;
		e=f;
		f=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
	if(d>e)
	{	X=d;
		d=e;
		e=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
	if(c>d)
	{	X=c;
		c=d;
		d=X;}
		if(a>b)
		{	X=a;
			a=b;
			b=X;}
	if(b>c)
	{	X=b;
		b=c;
		c=X;}
			if(a>b)
		{	X=a;
			a=b;
			b=X;}
	printf("%d\n%d\n%d",j,i,h);

return 0;
}

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

int main()
{
	int i,j,tmp1,tmp2,height[3]={0,0,0};
	for (i=0;i<10;i++){
		cin >> tmp1;
		for(j=0;j<3;j++)
		if(tmp1>height[j]){
			tmp2=height[j];
			height[j]=tmp1;
			tmp1=tmp2;
		}
	}
	for(i=0;i<3;i++){
		cout << height[i] <<endl;
	}
}

C++: #include<stdio.h>

int main()
{
	int mth[10];
	int topthree[3] = {0};

	for (int i = 1; i <= 10;){
		printf("?±±?????????%d ", i);
		scanf("%d", &mth[i - 1]);
		if (0 <= mth[i - 1] && mth[i - 1] <= 10000)
			i++;
	}
	for (int i = 0; i <= 9; i++){
		if (topthree[0] <= mth[i]){
			topthree[2] = topthree[1];
			topthree[1] = topthree[0];
			topthree[0] = mth[i];
		}
		else if (topthree[1] <= mth[i]){
			topthree[2] = topthree[1];
			topthree[1] = mth[i];
		}
		else if (topthree[2] <= mth[i]){
			topthree[2] = mth[i];
		}
	}
	for (int i = 0; i <= 2; i++){
		printf("%d\n", topthree[i]);
	}
	return 0;
}

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

int main(){

	int height[10];

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

	int sort[3]={0,0,0};
	int box;

	for(int i=0;i<10;i++){
		if(height[i]>sort[2]){
			sort[2]=height[i];
			if(sort[1]<sort[2]){
				box=sort[1];
				sort[1]=sort[2];
				sort[2]=box;
				if(sort[0]<sort[1]){
				box=sort[0];
				sort[0]=sort[1];
				sort[1]=box;
				}
			}
		}
	}

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

    return 0;
}

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

using namespace std;

int main(void){

  int mountain[10];
  int num = 2;

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

  sort( mountain , mountain + 10 );

  cout << mountain[9] << mountain[8] << mountain[7] << endl;
  return 0;
  }

C++: #include<cstdio>
#include<deque>
#include<algorithm>
using namespace std;main(){int n,i;deque<int>h;while(~scanf("%d",&n))h.push_back(n);sort(h.begin(),h.end());for(i=9;i>6;)printf("%d\n",h[i--]);}

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

C++: #include <iostream>

using namespace std;

int main(void)
{
	int input[10];

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


	for(int i = 3; i < 10; i++){
		for(int j = 0; j < 3; j++){
			if(input[i] > input[j]){
				input[j] = input[i];
				break;
			}
		}
	}

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


	return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
	int a=0;
	std::vector<int> vec(10);
	for(int i=0;i<10;i++){
		std::cin>>vec[i];
	}
	/*for(int d=0;d<3;d++){
		for(int i=0;i<10;i++){
			if(vec[i]>a)a=vec[i];
		}
		std::cout<<a<<std::endl;
		for(int i=0;i<10;i++){
			if(vec[i]==a)vec[i]=0;
		}
		a=0;
	}*/
	for(int i=0;i<9;i++){
		if(vec[i]<vec[i+1]){
			a=vec[i];
			vec[i]=vec[i+1];
			vec[i+1]=a;
			a=0;
		}
	}
	std::cout<<vec[0]<<std::endl<<vec[1]<<std::endl<<vec[2]<<std::endl;
	return 0;

C++: import java.util.*;

class Main{
    public static void main(String[] a){

        int[] h = new int[10]; //10??¶????????±?????\??????????????????????????£?¨?

        Scanner s = new Scanner(System.in);
        for(int i = 0; i < h.length; i++){
            h[i] = s.nextInt();
        }

        Arrays.sort(h);

        for(int i = 9; i >= 7; i--){
            System.out.println(h[i]);
        }

    }
}