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 <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=0;i<3;i++){
		cout<<m[9-i]<<endl;
	}
	return 0;
}

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

using namespace std;

int arr[12];

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

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

using namespace std;

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

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int mountain[11] ;
	for( int i=1 ; i<=10 ; i++ ){
		cin >> mountain[i] ;
	}
	for( int i=1 ; i<=10 ; i++ ){
		for( int k=1 ; k<=10 ; k++ ){
			if( mountain[i] > mountain[k] )
				swap( mountain[i] , mountain[k] );
		}
	}
	cout << mountain[1] << endl << mountain[2] << endl << mountain[3] << endl;
}

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

using namespace std;
int x[10];
int main(){
for(int i=0;i<10;i++){
cin>>x[i];
}
sort(x,x+10);
cout<<x[7]<<endl;
cout<<x[8]<<endl;
cout<<x[9]<<endl;
return 0;
}

C++: #include<iostream>
using namespace std;
void q_sort(int numbers[], int left, int right)
{
    int pivot, l_hold, r_hold;
    l_hold = left;
    r_hold = right;
    pivot = numbers[left];
    while (left < right)
    {
        while ((numbers[right] >= pivot) && (left < right))
            right--;
        if (left != right)
        {
            numbers[left] = numbers[right];
            left++;
        }
        while ((numbers[left] <= pivot) && (left < right))
            left++;
        if (left != right)
        {
            numbers[right] = numbers[left];
            right--;
        }
    }
    numbers[left] = pivot;
    pivot = left;
    left = l_hold;
    right = r_hold;
    if (left < pivot)
        q_sort(numbers, left, pivot-1);
    if (right > pivot)
        q_sort(numbers, pivot+1, right);
}
int main()
{
	int mountain[10];	
	for(int i=0;i<10;i++)
		cin>>mountain[i];
	q_sort(mountain,0,9);
	for(int i=9;i>6;i--)
		cout<<mountain[i]<<endl;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  priority_queue<int> que;
  int a;
  for(int i = 0;i < 10;i++) {
    cin >> a;
    que.push(a);
  }
  for(int i = 0;i < 3;i++){
    printf("%d\n", que.top());
    que.pop();
  }

  return 0;
}

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