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>

using namespace std;

int height[10];

int main(void)
{
	for(int i=0;i<10;i++){
		cin>>height[i];
	}
	for(int i=0;i<10;i++){
		int max=i;
		for(int j=i+1;j<10;j++){
			if(height[max]<height[j]){
				max=j;
			}
		}
		int tmp=height[i];
		height[i]=height[max];
		height[max]=tmp;
	}
	for(int i=0;i<3;i++){
		cout<<height[i]<<endl;
	}
}

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

using namespace std;

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

C++: #include <stdio.h>
const int N = 15;
int main(void)
{
	
	int a[N] = {0};
	int i, j, box, n;
	for(i = 0; i < 10; i++)
	{
		scanf("%d", &a[i]);
	}
	for(i = 0; i < 10; i++)
	{
		for(j = i; j < 10; j++)
		{
			if(a[i] < a[j])
			{
				box = a[j];
				a[j] = a[i];
				a[i] = box;
			}
		}
	}
	for(i = 0; i < 3; i++)
	{
		printf("%d\n", a[i]);
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a[10001],i,j,k,l,m;
	for(i=0;i<10;i++){
		cin>>a[i];
	}
	for(j=1;j<10;j++){
		if(a[0]<a[j]){
			swap(a[0],a[j]);
		}
	}
	for(k=2;k<10;k++){
		if(a[1]<a[k]){
			swap(a[1],a[k]);
		}
	}
	for(l=3;l<10;l++){
		if(a[2]<a[l]){
			swap(a[2],a[l]);
		}
	}
	for(m=0;m<3;m++){
		cout<<a[m]<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<functional>
using namespace std;
int main()
{
	int n;
	vector<int> mountain;
	while( cin >> n )
		mountain.push_back(n);
	sort( mountain.begin(), mountain.end(), greater<int>() );
	for(n=0; n<3; n++)
		cout << mountain[n] << endl;
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>
#include <algorithm>
#include <math.h>
#include <utility>

using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)

int main()
{
	int a[11];
	REP(i, 10) cin >> a[i];
	sort(a, a+10);
	cout << a[9] << endl << a[8] << endl << a[7] << endl;
	return 0;
}

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

int main(){
	int array[10];
	int work;
    for(int i=0; i<10; i++){
       cin >> array[i];
	}
	
	for(int i=0; i<10; i++){
       for(int j=10-1; j>i; j--){
			if(array[j] > array[j-1]){
				work = array[j];
				array[j] = array[j-1];
				array[j-1] = work;
			}
		}
	}
			
	for(int i=0; i<3; i++){
       cout << array[i] << "\n";
	}
	
    return 0;
}

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

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

  sort(h, h+10, greater<int>());

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

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


int main()
{
	int i[10];
	cin >> i;
	sort(i, i+10);
	cout << i[1] << endl;
	cout << i[2] << endl;
	cout << i[3] << endl;

	return 0;
}

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

int main(void){
	int x[10],top[3];
	int i;

	for(i=0;i<3;i++){
		top[i] = 0;
	}
	std::cin >>x[0]>>x[1]>>x[2]>>x[3]>>x[4]>>x[5]>>x[6]>>x[7]>>x[8]>>x[9];
	for(i=0;i<10;i++){
		if(top[0] < x[i]){
			top[2] = top[1];
			top[1] = top[0];
			top[0] = x[i];
		}
	}

	std::cout << top[0] << "\n" << top[1] << "\n" <<top[2] << "\n";
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
  int high,max1=0,max2=0,max3=0;
  for(int i=1;i<=10;i++){
    cin >> high;
    if(high>max1){
      max3=max2;
      max2=max1;
      max1=high;
    }
    else if(max2<high && high<=max1){
      max3=max2;
      max2=high;
    }
    else if(max3<high && high<=max2){
      max3=high;
    }
  }
  cout << max1 << endl << max2 << endl << max3 << endl;
}

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

const int N = 10;

void insertionSort(int *a, int n) {
  int v, j;
  for (int i=0; i<n; i++) {
    v = a[i];
    j = i - 1;
    while (0<=j && v<a[j]) {
      a[j+1] = a[j];
      j--;
    }
    a[j+1] = v;

    // for (int k=0; k<n; k++) {
    //   cout << a[k];
    //   if (k < n - 1) cout << " ";
    // }
    // cout << endl;
  }
}

int main() {
  int height[N];
  for (int i=0;i<N;i++) {
  	cin >> height[i];
  }
  insertionSort(height, N);

  int h = 3;
  for (int i=N-1;i>N-h-1;i--) {
  	cout << height[i] << endl;
  }

  return 0;
}

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

int main() {
	vector<int> v;
	int i, t;
	for (i = 0; i < 10; i++) {
		cin >> t;
		v.push_back(t);
	}
	std::sort(v.begin(), v.end(), std::greater<int>());
	cout << v[0] << endl
	     << v[1] << endl
	     << v[2] << endl;
	return 0;	
}

C++: #include<iostream>
#include <fstream>
#include <stdio.h>
#include <stdlib.h>
#define _USE_MATH_DEFINES
#include <math.h>
#include<string>
#include<vector>
#include<cmath>
#include<stack>
#include<queue>
#include<sstream>
#include<algorithm>
#include<map>
#include<complex>
using namespace std;


#define li			long long int
#define rep(i,to)	for(int i=0;i<((int)(to));i++)
#define repp(i,start,to)	for(int i=(int)(start);i<((int)(to));i++)
#define pb			push_back
#define sz(v)		((li)(v).size())
#define bgn(v)		((v).begin())
#define eend(v)		((v).end())
#define allof(v)	(v).begin(), (v).end()
#define dodp(v,n)		memset(v,(li)n,sizeof(v))
#define bit(n)		(1ll<<(li)(n))
#define mp(a,b)		make_pair(a,b)
#define rin	rep(i,n)
#define EPS 1e-10
#define ETOL 1e-8
#define MOD 1000000007
#define p2(a,b)		cout<<a<<"\t"<<b<<endl
#define p3(a,b,c)		cout<<a<<"\t"<<b<<"\t"<<c<<endl


int main(){
	vector<li> a(10);
	rep(i,10)cin>>a[i];
	
	sort(allof(a));
	
	cout<<a[9]<<endl;
	cout<<a[8]<<endl;
	cout<<a[7]<<endl;
	
	return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
	int a = 0,b=0;
	for (int i = 0; i < 10;i++){
		cin >> a;
		if (a>b){
			a = b;
		}

	}
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int a,b,max=0,max2=0,max3=0;
	for (a = 1; a <= 10; a++) {
		scanf("%d",&b);
		if (b > max){
			max=b;
		}
		else if (b>max2){
			max2=b;
		}
		else if(b>max3){
			b=max3;
		}
		printf("%d\n %d\n %d\n",max,max2,max3);
		return 0;
	}
}

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

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int a[10],i;
	for(i=0;i<10;i++)cin>>a[i];
	sort(a,a+10);
	for(i=9;i>6;i--)cout<<a[i]<<endl;
	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 <iostream>
#include <algorithm>
#include <vector>
using namespace std;

int main(void)
{
    vector <int> a;
    int b;

    for (int i = 0; i < 10; i++){
    cin>>b;
a.push_back(b);
}

while(1);

sort(a.begin(), a.end());
cout << a[9] << endl << a[8] << endl << a[7] << endl;

return 0;
}