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<iostream>
#include<vector>
#include<algorithm>

#define BOGO 10

using namespace std;

bool is_sorted(vector<int> arr, int size)
{
	bool sorted = true;
	for(int i = 0; i < size; i++){
		if(!(arr[i] <= arr[i+1])){
			sorted = false;
		}
	}
	
	return sorted;
}

int main()
{
	vector<int> arr(BOGO);
	
	for(int i = 0; i < BOGO; i++){
		cin >> arr[i];
	}
	
	for(;;){
		if(is_sorted(arr, arr.size())){
			break;
		}
		random_shuffle(arr.begin(), arr.end());
	}
	
	cout << arr[9] << "\n" << arr[8] << "\n" << arr[7] << endl;
}

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

int main(){
  int a[10];
  int tmp;
  int n = 0;

  while(n<10){
    cin >> a[n];
    n++;
  }

  int i,j;

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

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

C++: /* test */

C++: #include<stdio.h>

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

C++: #include<bits/stdc++.h>
using namespace std;
int a[11];
int main(){
	for(int i=1;i<=10;i++){
		scanf("%d",&a[i]);
	}
	sort(a+1,a+11);
	printf("%d\n%d\n%d\n",a[10],a[9],a[8]);
}

C++: a,b,c;main(t){for(;~scanf("%d",&t);)t>a&&(a=t),a>b&&(t=a,a=b,b=t),b>c&&(t=c,c=b,b=t);printf("%d\n%d\n%d\n",c,b,a);}

C++: #include<stdio.h>
int main(void){
	int n, h[3]={-1,-1,-1};
	int i, j, k;
	for(i=0;i<10;i++){
		scanf("%d", &n);
		for(j=0;j<3;j++){
			if(h[j] < n){
				for(k=2;k>j;k--){
					h[k] = h[k-1];
				}
				h[j]=n;
				break;
			}
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n", h[i]);
	}
	return 0;
}

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

int main() {
    std::vector<int> hills;
    for (int i = 0; i < 10; i++) {
        std::cout << i << std::endl;
        std::string input;
        std::cin >> input;
        int height = std::atoi(input.c_str());
        hills.push_back(height);
    }

    std::sort(hills.begin(), hills.end(), std::greater<int>());
    for (int i = 0; i < 3; i++) {
        std::cout << hills[i] << std::endl;
    }

    return 0;
}

C++: #include<stdio.h>
#include<deque>
#include<algorithm>
main(){int n,i;std::deque<int>h;while(~scanf("%d",&n))h.push_back(n);sort(h.begin(),h.end());for(i=9;i>6;)printf("%d\n",h[i--]);}

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

int main()
{
    int hight[10];

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

C++: //include----------------------------------------------------------------------------------------------------------------------
#include <bits/stdc++.h>
 
//using namespace--------------------------------------------------------------------------------------------------------------
using namespace std;
 
//define-----------------------------------------------------------------------------------------------------------------------
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define INF 1 << 25
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << "\n";
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
 
//typedef----------------------------------------------------------------------------------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned int uint;
typedef unsigned long long ull;
 
//const------------------------------------------------------------------------------------------------------------------------
const double EPS = 1e-10;
const double PI = acos( -1.0 );
 
//global-----------------------------------------------------------------------------------------------------------------------
vector<int> a(10);
 
//function---------------------------------------------------------------------------------------------------------------------
int main() {
    rep( i, 10 ) {
        scanf( "%d", &a[ i ] );
    }
    sort( a.begin(), a.end() );
    ROF( i, 9, 7 ) {
        printf( "%d\n", a[ i ] );
    }
    return 0;
}

C++: #include<stdio.h>
int main(){
	int l[10],r[10]={-1};
	int i,j,k,c[10]={11},n=0;
	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 array[10];
    int i, j, tmp;
     
    for(i=0; i<10; i++){
        cin >> array[i];
    }
     
    for(i=0; i<9; i++){
        for(j=i+1; j<10; j++){
            if(array[i] < array[j]){
                tmp = array[i];
                array[i] = array[j];
                array[j] = tmp;
            }
        }
    }
     
    for(i=0; i<3; i++){
        cout << array[i] << "\n";
    }
     
    return 0;
}

C++: #include <iostream>

using namespace std;
#define total 5


int main (void){

	int height[total];
	for(int i=0;i<total;i++){
		cin>>height[i];
		while(height[i]<0||height[i]>10000){
			cin>>height[i];
		}
	}
	int temp=0;
	for(int i=0;i<total;i++){
		for(int j=i+1;j<total;j++){
			if(height[i]<height[j]){
				temp=height[i];
				height[i]=height[j];
				height[j]=temp;
			}
		}
	}
	cout<<height[0]<<endl<<
		height[1]<<endl<<
		height[2]<<endl;
}

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

int main() {
    int a[15];
    for (int i = 0; i < 10; i++) cin >> a[i];
    sort(a, a + 10, greater<int>());

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

    return 0;
}

C++: #include <iostream>
#include <queue>
using namespace std;
typedef long long ll;

int main() {
    priority_queue<int> pq;
    
    for(int i=0;i<10;i++){
        int x;cin>>x;
        pq.push(x);
    }
    
    for(int i=0;i<3;i++){
        cout<<pq.top()<<endl;pq.pop();
    }
}