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<stdio.h>
int main(void){
	int height[3],d,i,mt;
	scanf("%d",&height[0]);
	scanf("%d",&height[1]);
	scanf("%d",&height[2]);
	if(height[0]<height[1]){
		d=height[0];
		height[0]=height[1];
		height[1]=d;
	}
	if(height[0]<height[2]){
		d=height[0];
		height[0]=height[2];
		height[2]=d;
	}
	if(height[1]<height[2]){
		d=height[1];
		height[1]=height[2];
		height[2]=d;
	}
	printf(">%d\n>%d\n>%d\n",height[0],height[1],height[2]);
	for(i=0; i<7; i++){
		scanf("%d",&mt);
		if(height[0]<mt){
			d=height[0];
			height[0]=mt;
			height[1]=d;
			height[2]=height[1];
		}else if(height[1]<mt){
			d=height[1];
			height[1]=mt;
			height[2]=d;
		}else if(height[2]<mt){
			d=height[2];
			height[2]=mt;
		}
		printf(">%d\n>%d\n>%d\n",height[0],height[1],height[2]);
	}
	printf("%d\n%d\n%d\n",height[0],height[1],height[2]);
	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());

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

    return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cstring>
#include<map>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()
#define foreach(it,c) for(typeof(c.begin()) it=c.begin();it!=c.end();++it)

int main()
{
    vector<int> h; int t;

    REP(10) { cin >> t; h.push_back(t);}
    sort(all(h), greater<int >());

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

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

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

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#define rep(i,n) for(int i=0;i<n;++i)
using namespace std;

int main() {
	int m[10];
	rep(i, 10)cin >> m[i];
	sort(m, m + 10);
	for (int i = 9; i >= 7; i--) {
		printf("%d\n", m[i]);
	}
	return 0;
}

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

using namespace std;

int xs[10];

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

	sort(xs, xs+10);
	reverse(xs, xs+10);
	for (int i = 0; i < 3; ++i)
		cout << xs[i] << endl;


	return 0;
}

C++: #include<bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define int long long
#define vec(a,n) vector<int> (a)((n));
#define Vec(a,n) vector<string> (a)((n));
#define twovec(a,n,m) vector<vector<int>> a(n,vector<int>(m,0));
#define Twovec(a,n,m) vector<vector<double>> a(n,vector<double>(m,0));
#define P pair<int,int>
#define All(a) (a).begin(),(a).end()
#define Sort(a) sort(All(a));
#define Reverse(a) reverse(All(a));
#define PQ(n) priority_queue<P,vector<P>,greater<P>> (n)
#define pq(n) priority_queue<int> (n)
#define print(a) cout << (a) << endl;
#define peintD(a) cout << setprecision(10) << ans << endl;
using namespace std;
int max_int = 1000000007;
void Debug(auto a);
int nibul(auto a,auto b);
int nibuu(auto a,auto b);
void input(vector<int>& a,int n);

int n,m;

signed main(){
    vec(a,10);
    input(a,10);
    Sort(a);
    Reverse(a);
    REP(i,3){
        print(a[i])
    }
    return 0;
}

void Debug(auto a){
    cout << "{ ";
    for(auto b: a){
        cout << b << " ";
    }
    cout << "}" << endl;
}
int nibul(auto a,auto b){
    int x = lower_bound(All(a),b) - a.begin();
    //key以上の初めてのitr
    return x;
}
int nibuu(auto a,auto b){
    int x = upper_bound(All(a),b) - a.begin();
    //key以下の最後のitr
    return x-1;
}

void input(vector<int>& a,int n){
    REP(i,n){
        cin >> a[i];
    }
}

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

C++: #include <iostream>
 
int main() {
  int x;
  int rank1 = 0;
  int rank2 = 0;
  int rank3 = 0;
  for (int i = 0; i < 10; i++) {
    std::cin >> x;
    if (x > rank1) {
      rank3 = rank2;
      rank2 = rank1;
      rank1 = x;
    } else if (x > rank2) {
      rank3 = rank2;
      rank2 = x;
    } else if (x > rank3) {
      rank3 = x;
    }
  }
  std::cout << rank1 << std::endl <<  rank2 << std::endl << rank3 << std::endl;
  return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int height[10];
	int i;
	for(i=0;i<10;i++)
		cin>>height[i];
	int j;
	int temp;
	for(i=9;i>0;i--)
		for(j=0;j<i;j++)
		{
			if(height[j]<height[j+1])
			{
				temp=height[j];
				height[j]=height[j+1];
				height[j+1]=temp;
			}

		}
		for(i=0;i<3;i++)
			cout<<height[i]<<endl;
		return 0;
}

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

void
swap(int *a, int *b)
{
    int tmp;
    tmp = *a;
    *a = *b;
    *b = tmp;
}

int main(){

	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;

void swap(int& a,int&b)
{
int tmp=a;
a=b;
b=a;
}

void sort(int a[],int n)
{
for(int i=1;i<n;i++)
{
  for(int j=i-1;j>=0;j--)
  {
  if(a[j]>a[j+1])
  break;
  swap(a[j],a[j+1]);
  }
}
}

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

sort(array,10);

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

return 0;
}

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

int main()
{
	int n[10],i=0;

	while (cin >> n[i])
		i++;
	sort(n,n+i-1,greater<int>());
	for (int j=0; j < 3; j++) {
		cout << n[j] << endl;
	}
	return 0;
}

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

int main()
{
    int height;
    vector<int> top3;

    while (cin >> height) {
        for (auto it = top3.begin(); it != top3.end(); it++) {
            if (height > *it) {
                it = top3.insert(it, height);
                break;
            }
        }
        if (top3.size() > 3)
            top3.pop_back();
        else if (top3.size() < 3)
            top3.push_back(height);
    }
    
    for (auto h: top3)
        cout << h << endl;

    return 0;
}

C++: #include <cstdio>
#include <algorithm>
using namespace std;
int main() {
	int h[10];
	for(int i=0;i<10;i++) {
		scanf("%d",&h[i]);
	}
	sort(h,h+10);
	for(int i=0;i<3;i++) {
		printf("%d\n",h[9-i]);
	}
}