Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	counter := 0
	var mountain []int
	for scanner.Scan() {
		i, err := strconv.Atoi(scanner.Text())
		if err != nil {
			break
		}
		mountain = append(mountain, i)
		counter++
		if counter == 10 {
			break
		}

	}
	sort.Ints(mountain)
	fmt.Println(mountain[9])
	fmt.Println(mountain[8])
	fmt.Println(mountain[7])
}

C++: #include "bits/stdc++.h"
using namespace std;
int main(){
    vector<int> v;
    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>
int main()
{
using namespace std;
int box[10];
for (int i=0;i<10;i++)
        cin >>box[i];
for (int i=1;i<10;i++)
{
        int key = box[i];
        int j = i-1;
        while (j>=0 && box[j] > key)
        {
                box[j+1]=box[j];
                j--;
        }
        box[j+1] = key;
}
cout << box[9] <<endl;
cout << box[8] <<endl;
cout << box[7] <<endl;
}

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

	int taller[3];
	int 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>
#include <vector>
#include <algorithm>
using namespace std;

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

C++: #include<iostream>
using namespace std;
int main(){
	
	int a[10],max,max2,max3;
	for(int i=0;i<10;i++){
		cin>>a[i];
	}
	max=a[0];
	max2=a[0];
	max3=a[0];
	for(int b=1;b<10;b++){
		if(max<a[b]){
			max=a[b];
		}
	}
	for(int c=1;c<10;c++){
		if(a[c]!=max){
			if(a[c]>max2){
				max2=a[c];
			}
		}
	}
	for(int d=1;d<10;d++){
		if(a[d]!=max&&a[d]!=max2){
			if(max3<a[d]){
				max3=a[d];
			}
		}
	}
	cout<<max<<endl;
	cout<<max2<<endl;
	cout<<max3<<endl;
	
	return 0;
}

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

int main() {
	int buf[3]={-1}, h, count=0;
	
	while(scanf("%d", &h) != EOF) {
		count++;
		if(h >= min(buf[0], min(buf[1], buf[2]))) {
			sort(buf, buf+3);
			reverse(buf, buf+3);
			buf[2] = h;
		}
	}
	sort(buf, buf+3);
	reverse(buf, buf+3);
	if(count <3) {
		for(int i=1; i<=count; i++) {
			printf("%d\n", buf[i-1]);
		}
	}
	else {
		for(int i=1; i<=3; i++)
			printf("%d\n", buf[i-1]);
	}
	return 0;
}

C++: #include <stdio.h>
int main(void)
{
	int a[11];
	int b;
	int i;
	int m1=0;
	int m2=0;
	int m3=0;
	for (b=1;b<11;b++)
	{
		scanf("%d", &a[b]);
	}
	for(i = 0;i < 10;i++)
	{
		for (b=1;b<11;b++)
		{
			if (m1<a[b])
			{
				m1=a[b];
			}
			else if (a[b]==m1)
			{
				m2=a[b];
			}
			else if (m2<=a[b] && m1>m2)
			{
				m2=a[b];
			}
			else if (a[b]==m2)
			{
				m3=a[b];
			}
			else if (m3<=a[b] && m2>m3)
			{
				m3=a[b];
			}
		}
	}
	printf("%d\n%d\n%d\n", m1, m2, m3);
	return 0;
}

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

#define M 10
#define REQUIRED 3

bool ascending (int i, int j) { return i > j; }

int main() {
  vector<int> heights(M, 0);
  for (int i = 0; i < M; i++) {
    cin >> heights[i];
  }

  std::sort(heights.begin(), heights.end(), ascending);
  for (int i = 0; i < REQUIRED; i++) {
    cout << heights[i] << endl;
  }
  
  return 0;
}

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

using namespace std;

int main()
{
	vector<int> data;
	int temp;

	for (int ix = 0; ix != 10; ++ix){
		cin >> temp;
		data.push_back(temp);
	}

	sort(data.begin(), data.end());
	for (int ix = 0; ix != 3; ++ix)
		cout << data[ix] << endl;

	return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int main(){
  int h[10];
  rep(i,10){
    cin >> h[i];
  }
  sort(h,h+10);
  reverse(h,h+10);
  rep(i,3){
    cout << h[i] << endl;
  }
  return 0;
}

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

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

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

int main(){
  vector<int> v;
  for(int i=0;i<10;i++){
    int m;
    cin >> m;
    v.push_back(m);
  }


  sort(v.begin(), v.end(), greater<int>());

  cout << v.at(0) << endl;
  cout << v.at(1) << endl;
  cout << v.at(2) << endl;

  return 0;
}

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

C++: //	created : 16/03/15
// 	author   : Rp7rf
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <set>
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
#define rep(i,a) for(int i = 0 ; i < a ; i ++)
#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define vi vector<int>
#define mp make_pair
#define pb push_back
#define MOD 1000000007
#define INF 1e9
 
int main(void){
    int q;
    string a,b;
    cin>>q;
    while(q--){
        cin>>a>>b;
        int dp[1010][1010] = {0};
        for(int j = 0 ; j < a.size() ; j ++){
            for(int i = 0 ; i < b.size() ; i ++){
                if(a[j] == b[i]){
                    dp[j+1][i+1] = dp[j][i]+ 1;
                }else{
                    dp[j+1][i+1] = max(dp[j][i+1],dp[j+1][i]);
                }
            }
        }
        cout<<dp[a.size()][b.size()]<<endl;
    }
}

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

using namespace std;

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

C++: #include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
int i,j,arr[20];

for(i=1;i<=10;i++)
{

sort(arr,arr+3);
printf("%d\n",arr[i]);
}
return 0;
}

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

int main(){
    vector<int> v(10);
    for(int i=0;i<10;i++)cin >> v[i];
    sort(v.rbegin(), v.rend());
    for(int i=0;i<3;i++)cout << v[i] << endl;
    return 0;
}

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