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(){
	int l[10],r[10]={-1};
	int i,j,k,c[10],n=0;
	for(i=0;i<10;i++){
		c[i]=11;
	}
	for(i=0;i<10;i++){
		scanf("%d",&l[i]);
	}
	for(j=0;j<10;j++){
		for(i=0;i<10;i++){
			for(k=0;k<10;k++){
				if(c[k]==i){
					n=1;
				}
			}
			if(!(n==1)){
				if(l[i]>=r[j]){
					r[j]=l[i];
					c[j]=i;
				}
			}
			n=0;
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",r[i]);
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int takasa[10];

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

	//????????????
	for (int i = 0; i < 9; i++) {
		for (int j = i+1; j < 10; j++) {
			if (takasa[i] <takasa[j]) {
				swap (takasa[i],takasa[j]);
			}
		}
	}
	
	for (int i = 0; i < 3; i++) {
		cout << takasa[i] << endl;
	}
	return 0;
}

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

using namespace std;

int main() {
  vector<int> mountains;
  for (int i = 0; i < 10; i++) {
    int mountain;
    scanf("%d", &mountain);
    mountains.push_back(mountain);
  }
  sort(mountains.begin(), mountains.end(), greater<int>());
  for (int i = 0; i < 3; i++) {
    printf("%d\n", mountains[0]);
    mountains.erase(mountains.begin());
  }
}

C++: #include <stdio.h>

int main ()
{
    int a[10], i, j, temp, t;
    scanf ("%d", &t);
    while (t--){
    for (i=0; i<10; i++){
        scanf("%d", &a[i]);
    }
    for (i=0; i<10; i++){
        for (j=i+1; j<10; j++){
            if (a[i]<a[j])
            {
                temp = a[i];
                a[i] = a[j];
                a[j] = temp;
            }
        }
    }

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

    return 0;
}

C++: #include<algorithm>
a[10],i
main(){
    for(;i<10;scanf("%d",a+i++));

}

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

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

int main(void)
{
  int heights[10];
  int i;
  for(i=0; i<10; ++i) {
    scanf("%d", &heights[i]);
  }
  qsort(heights, 10, sizeof(int), compare);
  printf("%d\n", heights[0]);
  printf("%d\n", heights[1]);
  printf("%d\n", heights[2]);

  return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;
class ListofTop3Hills{ 
    public:
        void solve(vector<int> m){
            for(int i=0;i<10;i++){ 
                for(int j=m.size()-1;j>0;j--){ 
                    if(m[j-1]<m[j]){ 
                        int tmp=m[j-1];
                        m[j-1]=m[j];
                        m[j]=tmp;
                    }
                }
            }
            for(int i=0;i<3;i++)cout<<m[i]<<endl;
        }
}; 
int main(){
    vector<int> m(10);
    for(int i=0;i<10;i++){ 
        cin>>m[i];
    }
    ListofTop3Hills inst;
    inst.solve(m);
    return 0;
}

C++: #include<bits/stdc++.h>
#define ll long long int
#define FOR(i,a,b) for(ll i=(ll)(a);i<(ll)(b);i++)
#define REP(i,n) FOR(i,0,n)
#define REP1(i,n) FOR(i,1,n)
using namespace std;
 /*temp*/

int main(){
    int a[10];
    REP(i,10){
        cin >> a[i];
    }
    sort(a, a+10);
    cout << a[9] << '\n'
         << a[8] << '\n'
         << a[7] << '\n';
}

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

typedef long int lint;
typedef long long int llint;
typedef pair<int, int> pii;
typedef pair<int, string> pis;
typedef pair<long, long> pll;

#define EACH(t, c) for (auto&& t : c)
#define ALL(c) begin(c), end(c)
#define FOR(i, s, e) for (int i = (s); i < (int)(e); ++i)
#define REP(i, n) FOR(i, 0, n)
#define endl '\n'
#define fk first
#define sv second

const int dx[] = {1, 0, -1, 0, 1, 1, -1, -1}, dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
const int MOD = (int)1e9 + 7;
const int INF = 999999999;

template<typename T>
void print(const std::vector<T>& v, char sep=' ') {
  for (int i = 0; i < (int)v.size(); i++) {
    if (i != 0) cout << sep;
    cout << v[i];
  }
  cout << endl;
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int a[10];

  REP(i, 10) {
    cin >> a[i];
  }
  sort(ALL(a));

  REP(i, 3) {
    cout << a[9 - i] << endl;
  }
}

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

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

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

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




return 0;
}

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

int main(){
	short int h[10]={};
	

	for(short int i=1; i<=10;i++){
		cin >> h[i];
		if(!(0<=h<=10000)){
			i--;
			continue;
		}
	}
	sort(h, h+10, greater<int>());
	for(short int i=0;i<3;i++){
		cout << h[i] << endl;
	}
	return 0;
}

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

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

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

int main(){
	vector<int> v;
	for(int i = 0;i < 10;i++){
		int n;
		cin >> n;
		v.push_back(n);
	}
	sort(v.begin(), v.end());
	//cout << endl;
	for(int i = 9; i >=7;i--){
		cout << v[i] << endl;
	}
	return 0;
}

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

using namespace std;

int main()
{
	int data[10];

	for (int i = 0; i < 10; i++) cin >> data[i];

	sort(data, data + 10);

	for (int i = 9; i >= 7; i--) cout << data[i] << endl;

	return (0);
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
 
using namespace std;
 
int tall[5000];
int idx=0;
 
int main(){
  while(~scanf("%d",tall+idx)){
    idx++;
  }
 
  sort(tall,tall+idx,greater<int>());
 
  for(int i=0;i<3;i++){
    printf("%d\n",tall[i]);
  }
}

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

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

  for(int i = 0; i < 10; ++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;
      }
    }
  }

  for(int i = 9; i > 6 ; --i) {
    cout << a[i] << endl;
  }
}

C++: #include<iostream>
using namespace std;
int main(){
int a=0,b=0,c=0,i,val,tmp_a,tmp_b;
for(i=0;i<10;i++){
cin >> val;
if(val>a){
tmp_a=a;
a=val;
tmp_b = b;
b=tmp_a;
c=tmp_b;
}else if(val>b){
tmp_a = b;
b = val;
c = tmp_a;
}else if(val>c){
c=val;
}
}
cout << a << "\n" << b << "\n" << c << endl;
return 0;
}