Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

C++: #include<iostream>
using namespace std;
int main() {
	typedef unsigned short int mew;
	mew mountain[10];
	for (int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}

	mew taller[3];
	mew a, b, c;

	a = mountain[0];
	b = mountain[1];
	c = mountain[2];

	for (int y = 3; y <= 9; y++) {
		if (a <= b) {
			if (a <= c) {
				if (a < mountain[y]) {
					a = mountain[y];
				}
			}
			else {
				if (c < mountain[y]) {
					c = mountain[y];
				}
			}
		}
		else if (b <= c)
		{
			if (b < mountain[y]) {
				b = mountain[y];
			}
		}
	}

	//biggest->taller[0],bigger->taller[1],taller[2]
	{
		if (a >= b&&a >= c)
		{
			taller[0] = a;
			if (b >= c)
			{
				taller[1] = b;
				taller[2] = c;
			}
			else {
				taller[1] = c;
				taller[2] = b;
			}
		}
		if (b >= a&&b >= c)
		{
			taller[0] = b;
			if (a >= c)
			{
				taller[1] = a;
				taller[2] = c;
			}
			else {
				taller[1] = c;
				taller[2] = a;
			}
		}
		if (c >= b&&c >= a)
		{
			taller[0] = c;
			if (b >= a)
			{
				taller[1] = b;
				taller[2] = a;
			}
			else {
				taller[1] = a;
				taller[2] = b;
			}
		}
	}

	cout << taller[0] << endl;
	cout << taller[1] << endl;
	cout << taller[2] << endl;

	char a____;
	cin >> a____;

	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{	
int i[3] = {0,0,0};
int n,j;
for(j=0;j<10;j++)
{
cin>>n;
	if(n >= 0 && n <=10000)
	{
		if(i[0] < n)
		{
		 i[2] = i[1];
		 i[1] = i[0];
		 i[0] = n;
		}
		else if(i[1] < n)
		{
		 i[2] = i[1];
		 i[1] = n;
		}
		else if(i[2] < n)
		{
		 i[2] = n;
		}
	}
}
	for(j=0;j<3;j++)
	{
 	cout<<i[j]<<endl;
	}
}

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

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

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;

#define REP(i, b, n) for (int i = (b); i < (n); i++)
#define rep(i, n) REP(i, 0, n)

int main()
{
	vector<int> nums;
	int n;
	while (cin >> n) {
		nums.push_back(n);
	}
	sort(nums.begin(), nums.end());
	reverse(nums.begin(), nums.end());
	rep(i, 3)
		cout << nums[i] << endl;
	return 0;
}

C++: #include <stdio.h>
#include <iostream>
using namespace std;
int main(){
int height[10],pos,max[3];
for(int i=0;i<10;++i)cin >> height[i];
for(int i=0;i<3;++i){
 int tmp = 0;
 for(int n=0;n<10;++n){
  if(tmp<height[n]){
   tmp = height[n];
   pos = n;
  }
 }
 max[i] = tmp;
 height[pos] = 0;
}
for(int i=0;i<3;++i)
 cout << max[i] << "\n";
 return 0;
}

C++: #include <bits/stdc++.h>
#include <iomanip>
#include <math.h>
//#include <unistd.h>
//#include <stdio.h>
#define rep(i,x) for(ll i = 0;i<x;i++)
#define all(a) (a).begin(),(a).end()
using ll = long long;
using ld = long double;
using namespace std;
using dou = double;
const ll INF = 1LL << 60;
const ll mod = 1000000007;
typedef pair<ll,ll> P;
using graph = vector<vector<ll>>;
template<class T> inline bool chmax(T& a, T b){if(a < b){a = b; return true;}return false;}
template<class T> inline bool chmin(T& a, T b){if(a > b){a = b; return true;}return false;}
ll gcd(ll a,ll b){
    if(a < b)swap(a,b);
    if(a % b == 0)return b;
    else return gcd(b,a%b);
}
bool isp(ll n){
    bool res = true;
    if(n == 1)return false;
    else{
        for(ll i = 2;i * i <= n;i++){
            if(n % i == 0){
                res = false;
                break;
            }
        }
        return res;
    }
}
const int MAX = 510000;

long long fac[MAX], finv[MAX], inv[MAX];

// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (int i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % mod;
        inv[i] = mod - inv[mod%i] * (mod / i) % mod;
        finv[i] = finv[i - 1] * inv[i] % mod;
    }
}

// 二項係数計算
long long COM(int n, int k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % mod) % mod;
}
/*
int main() {
    // 前処理
    COMinit();

    // 計算例
    cout << COM(100000, 50000) << endl;
}*/

//printf("%.10f\n", N);
/*
ll fibo(ll n){
    if(memo[n] != 0)return memo[n];
    if(n <= 1)return n;
    else return memo[n] = fibo(n - 1)+ fibo(n - 2);
}*/
/*  vector<ll> vec = {1,2,5,6,8,9,10};
    cout << binary_search(all(vec),5) << endl; -> true*/
/*
    vector<ll> vec = {1,2,5,6,8,9,10};
    auto n = upper_bound(all(vec),4);
    cout << *n << endl; -> 5*/
/*
    cout << fixed << setprecision(15);
*/

int main(){
    vector<ll> num(10);
    rep(i,10)cin >> num[i];
    sort(all(num));
    cout << num[9] << endl << num[8] << endl << num[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 <bits/stdc++.h>

#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i, c) for (typeof((c).begin()) i = (c).begin(); i != (c).end(); ++i)
#define EXIST(s, e) ((s).find(e) != (s).end())
#define SORTASC(c) sort((c).begin(), (c).end())
#define SORTDESC(c, t) sort((c).begin(), (c).end(), std::greater<t>());
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" \
                      << " " << __FILE__ << endl;

const double PI = acos(-1.0);

using ll = long long;
using namespace std;

int main()
{
    vector<ll> h;

    ll tmp;
    REP(i, 10){
        cin >> tmp;
        h.PB(tmp);
    }

    SORTDESC(h, ll);

    cout << h[0] << endl << h[1] << endl << h[2] << endl;

    return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int main(){
  int x;
  vector<int>a;
  for(int i=0;i<10;i++){
    cin>>x;
    a.push_back(x);
  }
  sort(a.begin(),a.end()); 
  cout<<a[9]<<endl;
  cout<<a[8]<<endl;
  cout<<a[7]<<endl;
}

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

int main(void)
{
  const int dataNum = 10;

  std::vector<int> vals;
  for (int i = 0; i < dataNum; i++) {
    int newVal;
    std::cin >> newVal;
    vals.push_back(newVal);
  }

  std::sort(vals.begin(), vals.end(), std::greater<int>());

  const int outputDataNum = 3;
  
  for (int i = 0; i < outputDataNum; i++) {
    std::cout << vals[i] << std::endl;
  }

  return 0;
}

C++: #include <stdio.h>
 
using namespace std;
 
 
int main(){
    int count[10001],tmp,num=3;
    for(int i=0;i<10001;i++)count[i]=0;
 
    for(int i=0;i<10;i++){
        scanf("%d",&tmp);
        count[tmp]++;
    }
 
    for(int i=10000;i>=0&&num>0;i--){
        if(count[i]>0){
            for(int k=0;k<count[i]&&num>0;k++){
                printf("%d\n",i);
                num--;
            }
        }
    }
 
    return 0;
}