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>

using namespace std;

int main(){
    vector<int> m(10);

    for(int i=0; i<10; i++){
        cin >> m[i];
    }
    sort(m.begin(), m.end());

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

    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]);
                getchar();
        }
        sort(high, high + 10);
        reverse(high, high + 10);
        for(i = 0; i < 3; i++){
                printf("%d", high[i]);
        }
        return 0;
}

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

int main(){
	int N[10];

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

	sort(&N[0], &N[0]+10, greater<int>());

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

	return 0;
}

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

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    vector<int> height(10);
    rep(i, 10) cin >> height[i];

    sort(ALL(height), greater<int>());

    rep(i, 3)
    {
        OP(height[i])
    }

    return 0;
}

C++: #include<iostream>

using namespace std;
int main()
{
int mount[10];
for(int i=0;i<10;i++)
{
cin >> mount[i];
}
int max[3];
max[0] = mount[0];
max[1] = mount[0];
max[2] = mount[0];
for(int i=1;i<10;i++)
{
if(mount[i]>max[0])
{
max[0] = mount[i];
}
}
for(int i=1;i<10;i++)
{
if(mount[i]>max[1]&&mount[i]!=max[0])
{
max[1] = mount[i];
}
}
for(int i=1;i<10;i++)
{
if(mount[i]>max[2]&&mount[i]!=max[0]&&mount[i]!=max[1])
{
max[2] = mount[i];
}
}
cout << max[0] << endl;
cout << max[1] << endl;
cout << max[2] <<endl;
return 0;
}

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

int main()
{
	vector<int> mt;
	for (int i = 0; i < 10; i++) {
		int tmp;
		cin >> tmp;
		mt.push_back(tmp);
	}
	sort(mt.begin(), mt.end());
	for (int i = mt.size()-1, j = 0; j < 3; i--, j++) {
		cout << mt[i] << 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] << endl;
	cout << x[8] << endl;
	cout << x[7] << endl;

	return 0;
}

C++: #include <iostream>
#include<algorithm>
using namespace std;
int main() {
	int a,one=0,two=0,three=0;
	for (int i=0;i<10;i++){
		cin>>a;
		if (a>three) three=a;
		if (three>two) swap(two,three);
		if (two>one) swap(one,two);
	}
		cout<<one<<endl<<two<<endl<<three<<endl;
	return 0;
}

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

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

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

#define BOGO 10

using namespace std;

bool is_sorted(vector<int> arr, int size)
{
	bool sorted = true;
	for(int i = 0; i < size; i++){
		if(!(arr[i] <= arr[i+1])){
			sorted = false;
		}
	}
	
	return sorted;
}

int main()
{
	vector<int> arr(BOGO);
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		if(is_sorted(arr, arr.size())){
			break;
		}
		random_shuffle(arr.begin(), arr.end());
	}
	
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

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

int main(){
  int a[10];
  int tmp;
  int n = 0;

  while(n<10){
    cin >> a[n];
    n++;
  }

  int i,j;

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

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

C++: /* test */

C++: #include<stdio.h>

int main()
{
	int high[10];
	int i, j, temp;
	
	for(i = 0; i < 10; i++){
		scanf("%d",&high[i]);
	}
	
	for (i = 0; i < 10; i++){
		for (j = 9; j > i; j--){
			if (high[j - 1] < high[j]){
				temp = high[j];
				high[j] = high[j - 1];
				high[j - 1]= temp;
			}
		}
	
	}
	printf("\n%d\n%d\n%d",high[0], high[1], high[2]);
	
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int a[11];
int main(){
	for(int i=1;i<=10;i++){
		scanf("%d",&a[i]);
	}
	sort(a+1,a+11);
	printf("%d\n%d\n%d\n",a[10],a[9],a[8]);
}

C++: a,b,c;main(t){for(;~scanf("%d",&t);)t>a&&(a=t),a>b&&(t=a,a=b,b=t),b>c&&(t=c,c=b,b=t);printf("%d\n%d\n%d\n",c,b,a);}

C++: #include<stdio.h>
int main(void){
	int n, h[3]={-1,-1,-1};
	int i, j, k;
	for(i=0;i<10;i++){
		scanf("%d", &n);
		for(j=0;j<3;j++){
			if(h[j] < n){
				for(k=2;k>j;k--){
					h[k] = h[k-1];
				}
				h[j]=n;
				break;
			}
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n", h[i]);
	}
	return 0;
}

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

int main() {
    std::vector<int> hills;
    for (int i = 0; i < 10; i++) {
        std::cout << i << std::endl;
        std::string input;
        std::cin >> input;
        int height = std::atoi(input.c_str());
        hills.push_back(height);
    }

    std::sort(hills.begin(), hills.end(), std::greater<int>());
    for (int i = 0; i < 3; i++) {
        std::cout << hills[i] << std::endl;
    }

    return 0;
}

C++: #include<stdio.h>
#include<deque>
#include<algorithm>
main(){int n,i;std::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>
#include <algorithm>
using namespace std;

int main()
{
    int hight[10];

    for(int i = 0; i < 10; i++){
        cin >> hight[i] ;
    }
    
    sort(hight, hight+10);
    
    for(int i = 9; i > 6; i--){
        cout << hight[i] << endl;
    }
    
    return 0;
}