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<stdio.h>
int main(void){
  int high[10]={},i;
  int max=0;
  int sec=0;
  int thi=0;
 
  for(i=0;i<10;i++){
    scanf("%d",&high[i]);
  }
 
  for(i=0;i<10;i++)
    if(max<high[i])
      max=high[i];
   
  for(i=0;i<10;i++)
    if(high[i]<max && sec<high[i])
      sec=high[i];
 
  for(i=0;i<10;i++)
    if(high[i]<sec && thi<high[i])
      thi=high[i];
 
  printf("%d\n%d\n%d\n",max,sec,thi);
 
  return 0;
}

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

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

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

int main(){
	int h = 0,m = 0,l = 0,tmp,i;

	for(i = 0;i < 9;i++){
		cin>>tmp;
		if(tmp > h){
			l = m;
			m = h;
			h = tmp;
		}else if(tmp > m){
			l = m;
			m = tmp;
		}else if(tmp > l){
			l = tmp;
		}
	}
	cout<<h<<endl;
	cout<<m<<endl;
	cout<<l<<endl;
	}
	return 0;
}

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

bool compare(int a, int b) {
    return a < b;
}

int main(void) 
{
    int i;
    std::vector<int> hs(0, 10);

    for (i = 0; i < 10; i++) {
        std::cin >> hs[i];
    }

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

    for (i = 0; i < 3; i++) {
        std::cout << hs[i] << "\n";
    }

    return 0;
}

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

int main(int argc, const char * argv[]) {
    
    vector<int> heights(10);
    for (int i=0; i<10; i++){
        cin >> heights[i];
    }
    sort(heights.begin(), heights.end(), greater<int>());
    
    for (int i=0; i<3; i++){
        cout << heights[i] << endl;
    }
    
    return 0;
}

C++: #include<stdio.h>
#define N 10

int main()
{
    int i, j, n, a=0;
    int A[N];

    for(i=0;i<10;i++){
        scanf("%d", &n);
        A[i] = n;
    }   
    for(i=0;i<3;i++){
        n = A[i];
        for(j=i+1;j<N;j++){
            if(n<A[j]){
                n = A[j];
                a = j;//max_index
            }   
        }   
        n = A[i];
        A[i] = A[a];
        A[a] = n;
        printf("%d\n",A[i]);
    }   
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
 
int main(){
  int a[10];
  rep(i,10){
    cin >> a[i];
    a[i] = -1*a[i];
  }

  sort(a, a+10);
 
  rep(i,3) cout << -1 * a[i] << endl;
 
     
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
int H[10];
int main() {
	for (int i = 0; i < 10; i++) {
		cin >> H[i];
	}
	sort(H.rbegin(), H.rend());
	for (int i = 0; i <3 ; i++) {
		cout << H[i] << endl;
	}
}

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

using namespace std;

int main()
{
	int i;
	int a;
	vector<int> num;
	
	for(i=0;i<10;i++)
	{
		cin >> a ;
		num.push_back(a);
	}
	
	sort(num.begin(),num.end());
	
	for(i=9;i>6;i--)
		cout << num[i] << endl;
}

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

C++: #include <iostream>

using namespace std;

int main()
{
    int temp;
    int height[10];
    int n = sizeof(height)/sizeof(height[0]);
    for(int x = 0; x < n; x++){
        cin >> height[x];//input
    }
    for(int q = 0; q < n - 1; q++){
        for(int w = 0; w < n - q - 1; w++)
        {
            if(height[w] < height [w+1])
            {
                temp  = height[w];
                height[w] = height[w+1];
                height[w+1] = temp;
            }
        }
    }
    for(int x = 0; x < 3; x++){
        cout << height[x] << endl;
    }
    return 0;
}

C++: #include<stdio.h>#include<algorithm>int main(){int a[10];for(int i = 0; i < 10; i++)scanf("%d", &a[i]);std::sort(a);for(int i = 0; i < 3; i++)printf("%d\n", a[i]);return 0;}

C++:  #include <cstdio>
 #include <queue>
 using namespace std;
 
 int main()
 {
         priority_queue<int> pmount;

         int mount[11];

         for(int j=0;j<10;j++){
                 scanf("%d",&mount[j]);
                 pmount.push(mount[j]);
         }

         for(int i=0;i<3;i++){
                 printf("%d\n",pmount.top());
                 pmount.pop();
         }

         return 0;

 }

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

int main()
{
	int length;
	int a, b, c,tmp;
	a = b = c = 0;

	for (int i = 0; i < 10; i++)
	{
		scanf("%d",&length);
		if (length > a)
		{
			if (length > b)
			{
				a = b;
				if (length > c)
				{
					b = c;
					c = length;
				}
				else
				{
					b = length;
				}
			}
			else
			{
				a = length;
			}
		}
		printf("%d\n",c);
		printf("%d\n",b);
		printf("%d\n",a);
	}
	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(end(x), begin(x));
	cout << x[0];
	cout << x[1];
	cout << x[2];
	
}

C++: #include <stdio.h>

int main(void){
    int data[10],bf;
    for(int i=0;i<10;i++){
        scanf("%d",&data[i]);
    }
    for(int i=10-1;i>0;i--){
        for(int j=0;j<i;j++){
            if(data[j]<data[j+1]){
                bf=data[j];
                data[j]=data[j+1];
                data[j+1]=bf;
            }
        }
    }
    for(int i=0;i<3;i++){
        printf("%d\n",data[i]);
    }
    return 0;
}

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

int main(void){
    int i, j, minj, cnt, high[10];
    for(i=0; i<10; i++) cin >> high[i];
    for (i=0; i<10; i++){
        minj = i;
        for(j=i+1; j<10; j++){
            if(high[j] < high[minj]){
                minj = j; 
            }
        }
        if(minj!=i){
            cnt++;
            swap(high[i], high[minj]);
        }
    }
    cout << high[9] << endl;
    cout << high[8] << endl;
    cout << high[7] << endl;
    return 0;
}

C++: //List of Top 3 Hills
#include<bits/stdc++.h>
using namespace std;
vector<int> v;

int main(){
  for(int i=0; i<10; i++){
    int tmp;
    scanf("%d", &tmp);
    v.push_back(tmp);
  }
  sort(v.begin(), v.end(), greater<int>());
  for(int i=0; i<3; i++)
    printf("%d\n", v[i]);
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <cstring>
#include <math.h>
#include <algorithm>
#include <vector>
#include <string>
#include <stdlib.h>
#include <queue>
#include <utility>
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=n-1;i>=0;i--)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define ll long long
#define LL long long
#define INF 100000000
using namespace std;
int keta(int n,int k){return (n/int(pow(10,double(k-1)))) % 10;} //n????????????k??????
ll gcd(ll n,ll m){
	if(n<m){ll a=m;m=n;n=a;}
	ll r=n%m;
	while(r!=0){
		n=m;
		m=r;
		r=n%m;
	}
	return m;
}
ll lcm(ll n,ll m){
	return n*m/gcd(n,m);
}
int main(){
	
	int x[10];
	rep(i,10){
		cin>>x[i];
	}
	sort(x,x+10);
	cout<<x[9]<<endl<<x[8]<<endl<<x[7]<<endl;
}