Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstdint>
#include <cstring>
#include <cctype>
#include <iostream>
#include <sstream>
#include <vector>
#include <list>
#include <deque>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <functional>
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef long long ll;
const double PI = 3.141592653589793238462643383279502884L;
const int LARGE_INT = 1000000007;
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i,a,cont,next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i,a,b,s) repfn(i,a,i<b,i+s)
#define repab(i,a,b) repby(i,a,b,1)
#define rep(i,b) repab(i,0,b)
#define pb push_back
#define sz(c) int((c).size())

int main(int argc, char **argv)
{
  vi v;
  int tmp;
  rep (i, 10) {
    cin >> tmp;
    v.pb(tmp);
  }
  sort(rall(v));
  rep (i, 3) {
    cout << v[i] << endl;
  }

  return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int i,k=0,tmp,a[10];
	

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

	while(1){//無限ループ
		for(i=0;i<9;i++){
			if(a[i]<a[i+1]){//もし昇順でない場合
				tmp=a[i];//隣接しあう値を昇順に入れ替える
				a[i]=a[i+1];
				a[i+1]=tmp;
				k++;//カウント
			}
		}
		if(k==0) break;//入れ替える必要がなくなったら終了
		k=0;//カウントの初期化
	}
	cout<<a[0]<<endl;
	cout<<a[1]<<endl;
	cout<<a[2]<<endl;
}

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

const int MAX_N = 9;
int a[MAX_N];
  
int main(){

    for(int i=0; i<=MAX_N; i++){
        cin >> a[i];
    }
     
    std::sort(a,a+10);
    cout << a[9] << endl << a[8] << endl << a[7] << endl;

    return 0;
}

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

int main(){
        int i;
        int high[10];
        for(i = 0; i < 10; i++){
                high[i] << cin;
        }
        partial_sort(high, high + 3, greater<int>());
        cout << high[0] << endl
                << hiht[1] << endl
                << high[2] << endl;y
        return 0;
}

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

void swap(int &x, int &y)
{
    int tmp = x;
    x = y;
    y = tmp;
}

int main(void){

	int a[11],max1,max2,max3;

	for (int i=1; i<11; i++){
		while (true){ 
		cout << "山の高さ" << i << "（整数）" ;			
		cin >> a[i];
		if ((cin.good() == 1) && (a[i] >= 0) && (a[i] <= 10000)) {
			break;
		}
		}	
	}

	max1 = a[1];

	for (int i=2; i<11; i++){
		if (max1 < a[i]){
			swap(max1,a[i]);
		}
	}
	max2 = a[2];

	for (int i=3; i<11; i++){
		if (max2 < a[i]){
			swap(max2,a[i]);
		}
	}
	max3 = a[3];

	for (int i=4; i<11; i++){
		if (max3 < a[i]){
			swap(max3,a[i]);
		}
	}


		cout << max1 << endl;
		cout << max2 << endl;
		cout << max3 << endl;
		

return 0;
	}

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

int main(){
    int hest[3]={0,0,0};
    int h;
    for(int i=0;i<10;i++){
        std::cin>>h;
        for(int j=0;j<3;j++){
            if(hest[j]<h){
                hest[j] = h;
            }
        }
    }

    for(int j=0;j<3;j++){
        std::cout<<hest[i]<<std::endl;
    }

    return 0;
}

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

using namespace std;

int main(){
	vector<int> vc;
	int n;

	while(cin >> n){
		vc.push_back(n);
	}

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

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

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

C++: #include <iostream>
using namespace std;
int main(){
    int a[10];
    for(int i=0; i<10; i++){
            cout<<"Height of mountain "<<i+1<<" ";
        cin>>a[i];
        cout<<endl;
    }
    for(int i=0; i<10; i++)
        for(int j=0; j<9-i; j++)
            if(a[j]<a[j+1])
                swap(a[j],a[j+1]);

        cout<<"Height of 1st mountain "<<a[2]<<endl;
        cout<<"Height of 2nd mountain "<<a[1]<<endl;
        cout<<"Height of 3rd mountain "<<a[0];
        return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{	
	int a[10] = {};
	int i = 0;
	while (cin >> a[i]) {
		i++;
		if (i == 10)break;
	}
	int max;
	for (int j = 0; j < 3; j++) {
		max = j;
		for (int k = j + 1; k < 10; k++) {
			if (a[max] < a[k]) {
				max = k;
			}
		}
		cout << a[max] << endl;
		a[max] = 0;
	}
	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 <algorithm>
using namespace std;

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

	return 0;
}

C++: #include<stdio.h>
int main(){
int i;
int height[10];
int temp, flag;
for(i = 0; i < 10; i++){
scanf("%d", &height[i]);
}
do{
flag = 0;
for(i = 0; i < 9; i++){
if(height[i] > height[i + 1]){
flag = 1;
temp = height[i + 1];
height[i + 1] = height[i];
height[i] = temp;
}
}
}while(flag);
printf("%d\n%d\n%d\n", height[9], height[8], height[7]);
return 0;
}

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

using namespace std;

const int numOfMountain = 10;

int main(int argc, char** argv){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

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

    auto out = mountains.end();
    for(int i = 0; i < 3; i++) {
        out--;
        cout << *out << endl;
    }

    return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<iostream>
using namespace std;
int main()
{
	int a[15],x=0;
	for(int i=1;i<=10;i++)
	{
		scanf("%d",&a[i]);

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

C++: #include<iostream>
#include<string>
using namespace std;
int main(){
    int a[10];
    for(int i=0;i<10;i++)
        cin>>a[i];
    for(int i=0;i<9;i++){
      for(int j=9;j>i;j--){
        if(a[j]>a[j-1]){
        int t=a[j];
        a[j]=a[j-1];
        a[j-1]=t;
       }
      }
    }
    cout<<a[0]<<endl;
    cout<<a[1]<<endl;
    cout<<a[2]<<endl;
    return 0;
}