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 <bits/stdc++.h>
using namespace std;

typedef long int lint;
typedef long long int llint;
typedef pair<int, int> pii;
typedef pair<int, string> pis;
typedef pair<long, long> pll;

#define EACH(t, c) for (auto&& t : c)
#define ALL(c) begin(c), end(c)
#define FOR(i, s, e) for (int i = (s); i < (int)(e); ++i)
#define REP(i, n) FOR(i, 0, n)
#define endl '\n'
#define fk first
#define sv second

const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
const int MOD = (int)1e9 + 7;
const int INF = 999999999;

template<typename T>
void print(const std::vector<T>& v, char sep=' ') {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i != 0) cout << sep;
    cout << v[i];
  }
  cout << endl;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a[10];

  REP(i, 10) {
    cin >> a[i];
  }
  sort(ALL(a));

  REP(i, 3) {
    cout << a[9 - i] << endl;
  }
}

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

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

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

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




return 0;
}

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

int main(){
	short int h[10]={};
	

	for(short int i=1; i<=10;i++){
		cin >> h[i];
		if(!(0<=h<=10000)){
			i--;
			continue;
		}
	}
	sort(h, h+10, greater<int>());
	for(short int i=0;i<3;i++){
		cout << h[i] << endl;
	}
	return 0;
}

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

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

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

int main(){
	vector<int> v;
	for(int i = 0;i < 10;i++){
		int n;
		cin >> n;
		v.push_back(n);
	}
	sort(v.begin(), v.end());
	//cout << endl;
	for(int i = 9; i >=7;i--){
		cout << v[i] << endl;
	}
	return 0;
}

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

using namespace std;

int main()
{
	int data[10];

	for (int i = 0; i < 10; i++) cin >> data[i];

	sort(data, data + 10);

	for (int i = 9; i >= 7; i--) cout << data[i] << endl;

	return (0);
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
 
using namespace std;
 
int tall[5000];
int idx=0;
 
int main(){
  while(~scanf("%d",tall+idx)){
    idx++;
  }
 
  sort(tall,tall+idx,greater<int>());
 
  for(int i=0;i<3;i++){
    printf("%d\n",tall[i]);
  }
}

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

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

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

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

C++: #include<iostream>
using namespace std;
int main(){
int a=0,b=0,c=0,i,val,tmp_a,tmp_b;
for(i=0;i<10;i++){
cin >> val;
if(val>a){
tmp_a=a;
a=val;
tmp_b = b;
b=tmp_a;
c=tmp_b;
}else if(val>b){
tmp_a = b;
b = val;
c = tmp_a;
}else if(val>c){
c=val;
}
}
cout << a << "\n" << b << "\n" << c << endl;
return 0;
}

C++: #include <cstdio>

void sort(int a, int b);

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

void sort(int a, int b) {
     int left, right, temp, pivot;
     if ( a < b ) {
          left = a; right = b;
          pivot = hill[ (a + b) / 2];
          while (left <= right) {
                while ( hill[left] > pivot ) left++;
                while ( hill[right] < pivot ) right--;
                if ( left <= right) {
                     temp = hill[left];
                     hill[left] = hill[right];
                     hill[right] = temp;
                     left++;
                     right--;
                }
          }
          sort(a, right);
          sort(left, b);
     }
}

C++: #include<iostream>

using namespace std;

int main(){
  int outHigh[3],inHigh[10];
  int where;
  outHigh[0]=0;
  outHigh[1]=0;
  outHigh[2]=0;

  for(int i = 0; i < 10; i++){
    cin>>inHigh[i];
  }
  
  for(int j = 0; j < 3; j++){
    for(int i = 0; i < 10; i++){
      if(outHigh[j] < inHigh[i]){
	outHigh[j] = inHigh[i];
	where = i;
      }	
    }
    inHigh[where] = 0;
  }
  cout << endl;
  for(int i = 0; i < 3; i++){
    cout << outHigh[i]<<endl;
  }
  
}

C++: #include<iostream>
#include<cmath>
#include<string>
#include<cctype>
#include<vector>
using namespace std;
int main(){
        vector<int>ar(10);
        for(auto&e:ar){
                scanf("%d",&e);
        }
        sort(ar.begin(),ar.end());
        printf("%d\n%d\n%d\n",ar[9],ar[8],ar[7]);
        return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a[10];
int main(){
for(int i=0;i<9;i++){
cin>>a[i];
}
sort(a[0],a[9]);
cout<<a[0]<<a[1]<<a[2]<<endl;
return 0;
}

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


int main(void){

	int a[11],i,j;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}


	for (i=1; i<11; ++i){
		for (j=i+1; j<11 ; ++j){
		if (a[i] < a[j]){swap(a[i],a[j]);}
	}
			}


	for (i=1;i<4;++i){
		cout << a[i] << endl;
	}
		

		return 0;
	}

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(void){
    int num;
    vector<int> mt(10);
    for(int i=0;i<10;i++){
        cin>>num;
        mt.push_back(num);
    }
    sort(mt.rbegin(),mt.rend());
    printf("%d\n%d\n%d\n",mt[0],mt[1],mt[2]);
    return 0;
}

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

int main(){
    int i=0,j=0,k=0,tmp=0;
    while(cin >> tmp){
        if (tmp > i)
        {
            k = j;
            j = i;
            i = tmp;
        }
        else if (tmp > j)
        {
            k = j;
            j = tmp;
        }
        else if (tmp > k)
        {
            k = tmp;
        }
    }
    cout << i << endl << j << endl << k << endl;
    return 0;
}

C++: #include<stdio.h>
 
int main(void)
{
  int i;
  int low;
  int mid;
  int large;
  int height[10];
   
  i=0;
  while(i++ < 10) {
    scanf("%d", height[i-1]);
    if(i==1) low = mid = large = height[0];
     
    if(height[i-1] > large) {
      large = height[i-1];
      mid = large;
    }
    else
    if(height[i-1] > mid) {
      mid = height[i-1];
      low = mid;
    }
    else
    if (low > height[i-1]){
      low = height[i-1];
    }
  }
  printf("%d\n%d\n%d\n", large,mid,low);
 
  return 0;
}