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 <cstdio>

int main() {
  int h;
  int h1 = 0, h2 = 0, h3 = 0;

  while (scanf("%d", &h) != EOF) {
    if (h > h1) {
      h3 = h2;
      h2 = h1;
      h1 = h;
    } else if (h > h2) {
      h3 = h2;
      h2 = h;
    } else if (h > h3) {
      h3 = h;
    }
  }

  printf("%d\n%d\n%d\n", h1, h2, h3);

  return 0;
}

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

#define MAX 256

int main(void){

	int a[10], b;

	for (int i = 0; i < 10; i++){
		scanf("%d", &a[i]);
	}

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

	printf("%d\n%d\n%d\n", a[0], a[1], a[2]);

	return 0;
}

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

int main()
{
	int a[10];
	for (int i = 0; i < 10; ++i)
	{
		cin >> a[i];
	}
	for (int i = 0; i < 10-1; ++i)
	{
		for (int j = i + 1; j < 10; ++j)
		{
			if (a[i] < a[j])
				swap(a[i], a[j]);
		}
	}
	for (int i = 0; i < 3; ++i)
	{
		cout << a[i] << endl;
	}
	system("pause");
	return 0;
}

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

int main()
{
	std::vector<int> vec(10);
	for (int i = 0; i < 10; ++i) {
		std::cin >> vec[i];
	}
	std::nth_element(
			vec.begin(), vec.begin() + 3, vec.end(),
			std::greater<int>());
	for (int i = 0; i < 3; ++i) {
		std::cout << vec[i] << std::endl;
	}
	return 0;
}

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

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

	sort(ary, ary + 10);

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

	return 0;
}

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

enum SORTORDER {ASC, DESC};

void SelectSort(int, int[], int);

int main(){
	const int SIZEINPUT = 10;
	const int NUMMIN = 1;
	const int NUMMAX = 10000;
	const int SIZEOUTPUT = 3;
	const int SORTORDER = DESC;

	int inputnum;
	int num[SIZEINPUT];
	int i;

	//input
	i = 0;
	while(i<SIZEINPUT){
		cin >> inputnum;
		if(inputnum>=NUMMIN && inputnum<=NUMMAX){
			num[i] = inputnum;
			i++;
		}else{
			cout << "Number " << inputnum << " is denied!" << endl;
		}
	}
	SelectSort(SIZEINPUT, &num[0], SORTORDER);
	//output
	i = 0;
	while(i<SIZEOUTPUT){
		cout << num[i] << endl;
		i++;
	}
}

void SelectSort(int n, int num[], int order){
	int i, j, k;
	int extreme;
	bool chk = false;

	for(i=0; i<n-1; i++){
		extreme = num[i];
		k = i;
		for(j=i+1; j<n; j++){
			switch(order){
			case ASC:
				chk = (num[j]<extreme);
				break;
			case DESC:
				chk = (extreme<num[j]);
				break;
			default:
				;
			}
			if(chk){
				extreme = num[j];
				k = j;
			}
		}
		num[k] = num[i];
		num[i] = extreme;
	}
}

C++: #include<stdio.h>

int main()
{
	int high[10] = {1819,2003,876,2876,1723,1673,3776,2848,1592,922};
	int cases;
	
	for(int i=0;i<9;i++)
	{
		for(int j=i+1; j<10; j++)
		{
			if(high[i] < high[j])
			{
				cases = high[i];
				high[i] = high[j];
				high[j] = cases;
			}
		}
	}
	
	printf("%d\n",high[0]);
	printf("%d\n",high[1]);
	printf("%d\n",high[2]);
	
	return 0;
}

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

int main(){
        int i;
        int high[10];
        for(i = 0; i < 10; i++){
                scanf("%d", &high[i]);
        }
        sort(high, high + 10);
        reverse(high, high + 10);
        for(i = 0; i < 3; i++){
                printf("%d", high[i]);
        }
        return 0;
}

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

int main()
{
	int x[10];
	int i,j,tmp;
	for(i=0;i<10;i++){
		cin >> x[i];
	}
	for(i=0;i<n-1;i++){
		for(j=n-1;j>i;j--){
			if(x[j]<x[j-1]){
				tmp = x[j];
				x[j] = x[j-1];
				x[j-1] = x[j];
			}
		}
	}
	cout <<x[0] <<endl;
	cout <<x[1] <<endl;
	cout <<x[2] <<endl;
		
		
	for(i=1;i<=9;i++){
		for(j=1;j<=9;j++){
			cout << i << "x" << j <<"=" <<i*j <<endl;
		}
	}
	
	
	return 0;
}

C++: //
//  main.cpp
//  AOJ_V0_0001
//
//  Created by anzai on 2015/08/06.
//  Copyright (c) 2015??´ anzai. All rights reserved.
//

#include<iostream>
using namespace std;

int main(){
    
    int array[10] = {0};
    
    for (int i = 0; i < 10; i++) {
        cin >> array[i];
        
    }
    int first = 0;
    int second = 0;
    int third = 0;
    for (int i = 0; i < 10; i++) {
        if (first <= array[i]) {
            third = second;
            second = first;
            first = array[i];
        }
        else if (second <= array[i]){
            third = second;
            second = array[i];
        }
        else if (third <= array[i]){
            third = array[i];
        }
    }
    cout << first << endl;
    cout << second << endl;
    cout << third << endl;
    
    return 0;
}

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

int main()
{
    std::vector<int> high(10);

    for(int i = 0; i < 10; ++i) std::cin>> high[i];

    std::sort(high.begin(), high.end());
    std::reverse(high.begin(), high.end());
    for(int i = 0; i < 3; ++i) std::cout << high[i] << std::endl;

    return 0;
}

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>
#include<climits>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long UInt64;
typedef long long Int64;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;



//bubble_sort
template<class T> inline void myswap(T& a,T& b)
{
	T tmp;
	tmp = a;
	a = b;
	b = tmp;
}


template<class _RanIt,class _Diff> inline	void _bubble_sort (_RanIt _Array,_Diff _Count)
{
	for(_Diff i = 0; i < _Count; i++)
	{
		for(_Diff j = _Count - 1; j > i; j--)
		{
			if(_Array[j] < _Array[j-1])
			{
				myswap(_Array[j],_Array[j-1]);
			}

		}
	}	
}

template<class _RanIt,class _Diff,class _Pr> inline void _bubble_sort (_RanIt _Array,_Diff _Count,_Pr Pred)
{
	for(_Diff i = 0; i < _Count; i++)
	{
		for(_Diff j = _Count - 1; j > i; j--)
		{
			if(Pred(_Array[j] , _Array[j-1]))
			{
				myswap(_Array[j],_Array[j-1]);
			}

		}
	}	

}

template<class _RanIt> inline	void bubble_sort(_RanIt _First,_RanIt _Last)
{
	_bubble_sort(_First,_Last - _First);
}

template<class _RanIt,class _Pr> inline	void bubble_sort (_RanIt _First,_RanIt _Last, _Pr _Pred)
{
	_bubble_sort(_First,_Last - _First,_Pred);
}
	
int main()
{
	
	int a[10];
	rep(i,10) cin>>a[i];

	bubble_sort(a,a+10);


	cout<<a[9]<<endl;
	cout<<a[8]<<endl;
	cout<<a[7]<<endl;

	return 0;
}