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 <stdio.h>

int main() {
    const int LENGH = 3;
    int mountains[10];

    for (int i = 0; i < 10; ++i) {
        scanf("%d", &mountains[i]);
    }

    {
        bool finished = false;
        while (!finished) {
            finished = true;

            for (int i = 0; i < 10 - 1; ++i) {
                if (mountains[i] < mountains[i + 1]) {
                    int temp = mountains[i + 1];
                    mountains[i + 1] = mountains[i];
                    mountains[i] = temp;
                    finished = false;
                }
            }
        }
    }

    for (int i = 0; i < LENGH; ++i) {
        printf("%d\n", mountains[i]);
    }
}

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

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

	for(i = 0;i < 10;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 <algorithm>
#include <cstdio>

using namespace std;

int main(void)
{ 
  int yama[10];
  for (int i = 0; i < 10; i++){
    scanf("%d", &yama[i]);
  }
  sort(yama, yama + 10);
  
  for (int i = 9; i >= 7; i--){
    cout << yama[i] << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<set>
#define rep(i,a,b) for(int i=a;i<b;i++)
using namespace std;
multiset<int> num;
int main(){
	int x,r=0;
	rep(i,0,10){
		cin>>x;
		num.insert(x);
	}
	multiset<int>::iterator ite=num.end();
	ite--;
	while(r<3){
		cout<<*ite<<endl;
		ite--;
		r++;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
#include <cstring>
#include <utility>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#define debug(x) cerr << #x << ':' << x << endl
#define rep(i,n) for(int i=0;i<(int)n;++i)
#define ALL(c) (c).begin(), (c).end()
using namespace std;
typedef long long ll;

int main(){
    vector<int> A(10);
    rep(i,10) cin >> A[i];
    sort(ALL(A));
    reverse(ALL(A));
    cout << A[0] << endl;
    cout << A[1] << endl;
    cout << A[2] << endl;
    return 0;
}

C++: #include<iostream>
#include<stdlib.h>
using namespace std;
int compare(const void *a,const void*b);
int main(){
  int data[10];
  int i;
  for(i=0;i<10;i++){
    cin>>data[i];
  }
  qsort(data,10,sizeof(int),compare);
  for(i=0;i<3;i++){
    cout<<data[i]<<endl;
  }
  return 0;
}

int compare(const void *a,const void*b){
  return *(int *)b-*(int *)a;
}

C++: #include<stdio.h>

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

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

void High(int* m)
{
	for (int i = 9; i > 0; i--)
	{
		for (int j = i - 1; j >= 0; j--)
		{
			if (m[i] > m[j])
			{
				int temp;
				temp = m[i];
				m[i] = m[j];
				m[j] = temp;
			}
		}
	}
}

int main(void)
{
	int m[10];

	for (int i = 0; i < 10; i++)
		cin >> m[i];
	High(m);
	for (int i = 0; i < 3; i++)
		cout << m[i] << endl;
	return 0;
}

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

int main(){
    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>

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

C++: #include<bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define INF 999999999
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define FFOR(i,a,b) for (int i=(a);i>(b);i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define SORT(c) sort((c).begin(),(c).end())
#define ALL(a) (a).begin(),(a).end()
typedef long long ll;
typedef pair<int,int> P;
typedef vector<int> Vi;
int a[10];
int main(){
  REP(i,10){
	  cin>>a[i];
  }
  SORT(a);
  FFOR(i,9,6){
	  cout<<a[i]<<endl;
  }
  return 0;
}

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

#include <algorithm>

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

C++: #include<iostream>
#include<stdio.h>
using namespace std;
int main(){
	int tall[10],i,j,box;
	for(i=0;i<10;i++){
		scanf("%d",&tall[i]);
	}
	for(i=0;i<9;i++){
		for(j=i+1;j<10;j++){
			if(tall[i]<tall[j]){
				box=tall[j];
				tall[j]=tall[i];
				tall[i]=box;
			}
		}
	}for(i=0;i<3;i++){
		printf("%d\n",tall[i]);
	}
	return 0;
}

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

int main(){
	int nyuryoku,high,low,middle,flag;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else{
				middle = nyuryoku;
		}else{	
			low = nyuryoku;
		}
		}
	}
}
	cout<<high<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}

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

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

int main(){
  int n = 10, m = 3;
  int ans[m];
  memset(ans, 0, sizeof(ans));

  for(int i = 0; i < n; i++){
    int x;
    cin >> x;

    for(int j = 0; j < m; j++){
      if(x > ans[j]){
        for(int k = m - 1; k > j; k--){
          ans[k] = ans[k - 1];
        }
        ans[j] = x;
        break;
      }
    }
  }

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

C++: #include <iostream>
#include <array>
#include <algorithm>
 
int main(void) {
    std::array<u_int, 10> heights;
    //??\???
    for (u_int i = 0; i < 10; ++i) {
        std::cin >> heights[i];
    }
    //?????????
    std::sort(heights.begin(), heights.end(), std::greater<u_int>());
    //??????
    for (u_int i = 0; i < 3; ++i) {
        std::cout << heights[i] << std::endl;
    }
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){

    int n1=0;
    int n2=0;
    int n3=0;
    int h;
    while(cin >> h){
        int tmp;
        if(h>n3) n3=h;
        if(n3>n2){
            tmp=n2;
            n2=n3;
            n3=tmp;
        }
        if(n2>n1){
            tmp=n1;
            n1=n2;
            n2=tmp;
        }
    }
    
    cout << n1 << endl;
    cout << n2 << endl;
    cout << n3 << endl;
    
    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
 
__int128_t a[15];
 
int main(){
    for(int i=0;i<10;i++){
        cin>>a[i];
    }
    sort(a, a+10);
    cout<<a[9]<<endl
        <<a[8]<<endl
        <<a[7]<<endl;
}