Go: package main

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

func getsAsIntArray() (line []int) {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		str := scanner.Text()
		if str == "" {
			break
		}
		data, err := strconv.Atoi(str)
		if err != nil {
			break
		}
		line = append(line, data)
	}

	return
}

func main() {

	lines := getsAsIntArray()
	sort.Sort(sort.Reverse(sort.IntSlice(lines)))
	for i, v := range lines {
		if i < 3 {
			fmt.Println(v)
		}
	}
}

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

using namespace std;

int main(){

	priority_queue<int> pq;
	for(int i = 0; i < 10; i++){
		int tmp;
		cin >> tmp;
		pq.push(tmp);
	}

	for(int i = 0; i < 3; i++){
		cout << pq.top() << endl;
		pq.pop();
	}

	int x;
	cin >> x;

	return 0;
}

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

int main(void){
    int high[10];
	for(int i=0;i<10;i++){
		cin >> high[i];
	}
    
	for(int i=0;i<9;i++){
		int max_index = i;
		for(int j=i+1;j<10;j++){
			if(high[max_index] < high[j]){
				max_index = j;
			}
		}
		swap(high[i],high[max_index]);
	}
	
	for(int i=0;i<3;i++){
	    cout << high[i] <<endl;
	}
}

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

C++: #include <iostream>
using namespace std;
void swap_(int* a,int* b){
	int temp=*a;*a=*b;*b=temp;
}
int main(){
	int hight[10];
	for(int i=0;i<10;i++) cin >> hight[i];
	for(int i=1;i<=3;i++){
		for(int j=9;j>=i;j--){
			if(hight[j-1]<hight[j]) swap_(&hight[j],&hight[j-1]);
		};};
	for(int i=0;i<3;i++) cout << hight[i] << '\n' ;
}

C++: #include<stdio.h>

int main(){
	int i,j,k,nb=0,low=9,height[10];
	for(i=0;i<10;i++)
		scanf("%d",&height[i]);
	for(i=0;i<3;i++){
		for(j=0;j<10;j++){
			for(k=0;k<10;k++){
				if(height[j]>height[k])
					nb++;
			}
			if(nb==low){
				printf("%d\n",height[j]);
				low--;
				break;
			}
			nb=0;
		}
	}

	return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;


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

C++: i = 0
while i < 10 do
 a[i] = gets
 i = i + 1
end

b = a.map(&:to_i).sort
puts b[0]
puts b[1]
puts b[2]

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

int main(void) {
    int height[10];
    
    for(int i = 0; i < 10; ++i) {
        cout << "No." << i + 1 << " : " << flush;
        cin >> height[i];
    }
    sort(height, height + 10);
    
    for(int i = 0; i < 3; ++i) {
        cout << height[9 - i] << endl;
    }
}

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

using namespace std;

int main() {
	int i, m[10];

	for(i=0; i<10; i++) {
		while(1) {
			cin >> m[i];
			if(m[i]>0&&m[i]<10001)
				break;
		}
	}

	sort(m, m+10);

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

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
  
int main(){
    vector<int> h(10);
    int in;
    for(int i=0;i<10;i++){
        cin>>in;
        h[i]=in;
    }
    sort(h.begin(),h.end());
    cout<<h[9]<<endl;cout<<h[8]<<endl;cout<<h[7]<<endl;
    return 0;
}

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

    return 0;
}

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;
  while (!cin.eof()) {
    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 max1=0,max2=0,max3=0,h;
    
    for(int k=1;k<=10;k++){
    cin>>h;
        
        if(h>max1){
            max3=max2;
            max2=max1;
            max1=h;
        }
        else if(h>max2){
            max3=max2;
            max2=h;
        }
        
    else if(h>max3)
            max3=h;
    }
    
    cout<<max1<<endl;
    cout<<max2<<endl;
    cout<<max3<<endl;
    
    
}

C++: #include <stdio.h>
int main(){
int a,b,c,d,a_max,N[10];

for(a=0;a<10;a++){ 
scanf("%d",&N[a]);
}

for(b=0;b<10;b++){
 b=a_max;
for(c=b;c<10;c++){ 
if(N[a_max]<N[c]){
c=a_max;
}  
d=c; 
c=a_max;
 a_max=d; }

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

return 0;
}

C++: 
#include <iostream>

using namespace std;

int main()
{
    int a[10];
    int temp;
    for(int i=0;i<10;i++){
        cin>>a[i];
    }
    for(int b=0;b<10;b++)
    for(int j=0;j<10;j++){
        if(a[j]>a[j+1]){
            temp = a[j];
            a[j] = a[j+1];
            a[j+1] = temp;
        }
    }

    cout<<a[9]<<endl;
    cout<<a[8]<<endl;
    cout<<a[7]<<endl;
    return 0;
}

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

const unsigned int NUM = 10;

int main(){
	std::vector<int> nums(NUM);
	
	for(auto& num : nums){
		std::cin >> num;
	}

	std::sort(nums.begin(), nums.end(), std::greater<int>());

	std::cout << nums[0] << std::endl;
	std::cout << nums[1] << std::endl;
	std::cout << nums[2] << std::endl;
}

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

typedef long long ll;
typedef pair<ll, ll> P;

#define pb push_back
#define rep(i, n) for(int i = 0; i < (n); i++)
#define dep(i, a, n) for(int i = a; i >= (n); i--)
#define FOR(i, a, n) for(int i = a; i < (n); i++)
#define mod (ll)(1e9+7)
#define int ll
#define INF 100000000

__attribute__((constructor))
void initial() {
  cin.tie(0);
  ios::sync_with_stdio(false);
}

signed main() {
	ll n;
  vector<int> result;
  rep(i, 10) {
    cin >> n;
    result.pb(n);
  }
  sort(result.begin(), result.end());
  reverse(result.begin(), result.end());
  rep(i, 3) cout << result[i] << endl;
	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<cmath>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
#define fi first
#define se second
#define mp make_pair
const int inf=1e9+7;
const ll mod=1e9+7;

int main() {
  vector<int> arr(10);
  for(int i=0;i<10;++i){
    cin>>arr[i];
  }
  sort(arr.begin(), arr.end(), greater<int>());
  for(int i=0;i<3;++i){
    cout<<arr[i]<<endl;
  }
}