Go: package main

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

var maxint = 10000
var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	scanner.Scan()
	return strconv.Atoi(scanner.Text())
}

func main() {
	scanner.Split(bufio.ScanWords)
	arr := make([]int, 10)
	for i := range arr {
		n, _ := nextInt()
		arr[i] = n
	}

	sort.Slice(arr, func(i, j int) bool {
		return arr[i] >= arr[j]
	})

	arrStr := fmt.Sprintf("%+v", arr[0:3])
	arrStr = arrStr[1:(len(arrStr) - 1)]
	arrStr = strings.Replace(arrStr, " ", "\n", -1)
	fmt.Println(arrStr)
}

C++: #include <stdio.h>
#include <stdlib.h>
#include <math.h>
#pragma warning(disable:4996)

int main()
{

	int MontainIn[10];

	for (int nCnt = 0; nCnt < 10; nCnt++)
		scanf("%d", &MontainIn[nCnt]);

	for (int nCnt = 0; nCnt < 10; nCnt++)
	{
		for (int nCnt2 = 0 ; nCnt2 < 10; nCnt2++)
		{
			if (nCnt2 == nCnt)
				continue;

			if (MontainIn[nCnt] > MontainIn[nCnt2])
			{
				MontainIn[nCnt] ^= MontainIn[nCnt2];
				MontainIn[nCnt2] ^= MontainIn[nCnt];
				MontainIn[nCnt] ^= MontainIn[nCnt2];
			}
		}
	}

	for (int nCnt = 0; nCnt < 3; nCnt++)
		printf("%d\n", MontainIn[nCnt]);

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int t1,t2,t3,T;
	for(int i=0;i<10;i++){
		cin>>T;
		if(T>=t1){
			t3=t2;
			t2=t1;
			t1=T;
		}
		else if(T>=t2){
			t3=t2;
			t2=T;
		}
		else if(T>=t3){
			t3=T;
		}
	}
	cout<<t1<<endl<<t2<<endl<<t3<<endl;
	return 0;
}

C++: #include<stdio.h>
    main()
    {
        int a[15];
        int i,j,k;
        for(i=0;i<10;i++)
        {
            scanf("%d",&a[i]);
        }

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


            }
        }
        printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
        return 0;

    }

C++: #include <iostream>
#include <queue>
#include <vector>
#include <set>
#include <algorithm>
#include <stdio.h>
//#define int long long
inline int in() { int32_t x; scanf("%d", &x); return x ;}
using namespace std;
const int INF = 1e18;
const int MAX_N = 1e5 + 5;
struct top3
{
    int a[4] = {0 , 0 , 0 , 0};
    void add(int x)
    {
        a[3] = x;
        sort(a , a + 4 , greater<int>());
    }
}tp;
int32_t main()
{
    int x;
    
    while (scanf("%d",&x) != EOF)
    {
        tp.add(x);
    }
    
    cout << tp.a[0] << endl << tp.a[1] << endl << tp.a[2] << endl;
}

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

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

  sort(a.begin(),a.end());

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

  return(0);
}

C++: #include <stdio.h>

int main(){

	int a[10] = {}, i, g, n;
	for (i = 0; i < 10; i++){ scanf("%d", &a[i]); }
	for (n = 0; n < 9; n++){
		for (i = 0; i < 9; i++){
			if (a[i] < a[i + 1]){
				g = a[i];
				a[i] = a[i + 1];
				a[i + 1] = g;
			}
		}
	}
	for (i = 0; i < 3; i++){ printf("%d\n", a[i]); }
	return 0;
}

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

	mew taller[3];
	mew 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;

	return 0;
}

C++: #include <iostream>

using namespace std;

void buble_sort(int high[]){
    int i,j,v;

    for(i = 0;i < 9;i++){
        v = i;
        for(j = i;j <= 9;j++){
            if(high[v] < high[j]){
                v = j;
            }
        }
        int box = high[i];
        high[i] = high[v];
        high[v] = box;

    }
}

int main() {
    int i,high[10];

    for (i = 0;i <= 9;i++){
        cin >> high[i];
    }

    buble_sort(high);

    for(i = 0;i <= 2;i++){
        cout << high[i] << endl;
    }

    return 0;
}

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

int main() {
	int n[10],top,tap,min,h=0;
	for(int i=0;i<10;i++){
		cin>>n[i];
	}
	for(int j=0;j<10;j++){
				if(top<n[j]){
					h=top;
					min=tap;
					top=n[j];
					tap=h;
					h=0;
				}
				else if(tap<n[j]){
					min=tap;
					tap=n[j];
				}
				else if(min<n[j]){
					min=n[j];
				}
			}
	cout<<top<<"\n"<<tap<<"\n"<<min<<endl;
	return 0;
}

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

using namespace std;

int main(){

  int in;
  vector<int> V;

  while(cin >> in){
    V.push_back(in);
  }

  sort(V.begin(), V.end());
  reverse(V.begin(), V.end());

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

  return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>

int int_cmp(const int *a, const int *b)
{
    if (*a > *b)
        return (-1);
    else if (*a < *b)
        return (1);
    return (0);
}

int main(void){
    int i;
	int x[10];
	for(i=0;i<10;i++){
		scanf("%d",&x[i]);
	}
	qsort(x,10,sizeof(int),  (int(*)(const void*, const void*))int_cmp);

	printf("%d\n%d\n%d\n",x[0],x[1],x[2]);

}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<functional>
 
using namespace std;
 
int main(){
int height[10000], i=0;
 
while(cin >> height[i++]);
 
partial_sort(height, height+3, height+i, greater<int>());
 
cout << height[0] << endl;
cout << height[1] << endl;
cout << height[2] << endl;
 
return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

vector<int> data;

int main(){
	REP(i,10){
		int tmp;
		cin >> tmp;
		data.pb(tmp);
	}
	sort(All(data));
	cout << data[9] << endl;
	cout << data[8] << endl;
	cout << data[7] << endl;
	return 0;
}

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


int N,M,p,d[10000],x[4],r,l;
int main(){
for(int i=0;i<10;i++){
cin>>d[i];
}
sort(d,d+10);
for(int i=0;i<3;i++){
cout<<d[i]<<endl;}
return 0;
}

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

int main()
{
	int x[10];
	int i,j,tmp;
	for(i=0;i<10;i++){
		cin >> x[i];
	}
	for(i=0;i<n-1;i++){
		for(j=n-1;j>i;j--){
			if(x[j]<x[j-1]){
				tmp = x[j];
				x[j] = x[j-1];
				x[j-1] = x[j];
			}
		}
	}
	cout <<x[0] <<endl;
	cout <<x[1] <<endl;
	cout <<x[2] <<endl;
		
		
		
	
	return 0;
}

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