Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextInt() int {
	scanner.Scan()
	i, e := strconv.Atoi(scanner.Text())
	if e != nil {
		panic(e)
	}
	return i
}
func main() {
	heighs := make([]int, 10)
	for i := range heighs {
		heighs[i] = nextInt()
	}
	sort.Sort(sort.Reverse(sort.IntSlice(heighs)))
	for i := 0; i < 3; i++ {
		fmt.Println(heighs[i])
	}
}

C++: #include <iostream> //üoÍ
#include <vector>   //®Izñ

using namespace std;

int main(){
	vector<int> vec;
	int n;

	while(cin >> n){
		vec.push_back(n);
	}

	for(int i=0;i<vec.size();i++){
		for(int j=0;j<vec.size()-1;j++){
			if(vec[j] < vec[j+1]){
				int num = vec[j];
				vec[j] = vec[j+1];
				vec[j+1] = num;
			}
		}
	}

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

	return 0;
	
}

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

using namespace std;

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

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

using namespace std;
 
int main(){
  int x[10],tmp,i,j;

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

  sort(x,x+10,greater<int>());

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

  for(i=0; i<3; ++i)
    cout << x[i] << "\n";

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
    int a,b,c,in,t;
    a=b=c=0;
    for(int i=0;i<10;i++){
        cin>>in;
        if(in>a){
            t=a;
            a=in;
            in =t;
        }
        if(in>b){
            t=b;
            b=in;
            in =t;
        }
        if(in>c){
            t=c;
            c=in;
            in =t;
        }
    }
    cout<<a<<endl;cout<<b<<endl;cout<<c<<endl;
    return 0;
}

C++: #include<vector>
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
	
	int n,a;
	vector<int>v;
	
	for(n=0;n<10;n++){
	cin>>a;
	v.push_back(a);
	}

	sort(v.begin(),v.end());
	cout << v[7] << endl << v[8] << endl << v[9] << endl;
	
}

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

using namespace std;

class cTop3Hills
{
	vector<int> m_vh;
public:
	cTop3Hills(vector<int> &v)
	{
		m_vh = v;
	}
	void compare();
};

bool comp(int i, int j) { return i > j; }

void cTop3Hills::compare()
{
	sort(m_vh.begin(), m_vh.end(), comp);
	for (int i = 0; i < 3; ++i)
		cout << m_vh[i] << endl;
}

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	vector<int> vh;
	int th;
	for (int i = 0; i < 10; ++i)
	{
		cin >> th;
		vh.push_back(th);
	}

	cTop3Hills ct(vh);
	ct.compare();

	return 0;
}

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

int main()
{
	int x[10];
	for (int i = 0; i < 10; i++)
	{
		cin >> x[i];
	}
	sort(begin(x),end(x));
	cout << x[9] << " " << x[8]  << " " << x[7] << endl;

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;int a[10],*b=a-1;int main(){while(cin>>*++b);sort(a,a+10);while(b>a+7)cout<<*--b<<endl;}

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

int main(){
	int m[10];
	
	for(int i = 0;i < 10;i++){
		cin >> m[i];
		
		while(!((m[i] >= 0)&&(m[i] <= 10000))){
			cout << "wrong value\n";
			cin >> m[i];
		}
	}
	sort(m, m+10,greater<int>());
	
	for(int i = 0;i < 3;i++){
		cout << m[i];
	}
	
    return 0;
}

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

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

  sort(h, h+10, greater<int>());

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

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;

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

C++: #include <bits/stdc++.h>

using namespace std;

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

C++: #include <iostream>
#include <algorithm>
#define c cin
#define o cout
#define el endl
using namespace std;

int main(){
	int mount[10];
	for(int i=0;i<10;i++) c>>mount[i];
	sort(mount, mount+10);
	for(int i=9;i>6;i--) o<<mount[i]<<el;
}

C++: #include <iostream>

using namespace std;

void insert(int* array, int index, int size, int num){
  for(int i = (size-1); i > index; i--){
    *(array + i) = *(array + i - 1);
  }
  *(array + index) = num;
}

void rqsort(int* array, int size, int num){
  for(int i = 0; i < size; i++){
    if(*(array + i) < num){
      insert(array, i, size, num);
      return;
    }
  }
}

int main(int argc, char const *argv[]) {

  int ans[3] = {0,0,0};
  int n;
  for(int i = 0; i < 10; i++){
    cin >> n;
    rqsort(ans, 3, n);
  }
  for(int i = 0; i < 3; i++){
    cout << ans[i] << endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
    ios::sync_with_stdio(false), cin.tie(0);
    vector<int>c;
    for(int i=0;i<10;i++){
        int a;
        cin>>a;
        c.push_back(a);
    }
    sort(c.begin(),c.end());
    cout<<c[c.size()-1]<<endl;
    cout<<c[c.size()-2]<<endl;
    cout<<c[c.size()-3]<<endl;
	return 0;
}

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

using namespace std;

void Top3Mountains(int m[10])
{
			deque<int> mountains;
			if ( m[0] >= 0 && m[0] <= 10000 )mountains.push_back(m[0]);
			if ( m[1] >= 0 && m[1] <= 10000 )mountains.push_back(m[1]);
			if ( m[2] >= 0 && m[2] <= 10000 )mountains.push_back(m[2]);
			if ( m[3] >= 0 && m[3] <= 10000 )mountains.push_back(m[3]);
			if ( m[4] >= 0 && m[4] <= 10000 )mountains.push_back(m[4]);
			if ( m[5] >= 0 && m[5] <= 10000 )mountains.push_back(m[5]);
			if ( m[6] >= 0 && m[6] <= 10000 )mountains.push_back(m[6]);
			if ( m[7] >= 0 && m[7] <= 10000 )mountains.push_back(m[7]);
			if ( m[8] >= 0 && m[8] <= 10000 )mountains.push_back(m[8]);
			if ( m[9] >= 0 && m[9] <= 10000 )mountains.push_back(m[9]);

			sort(mountains.begin(),mountains.end(),greater<int>());

			deque<int>::iterator it = mountains.begin();

			int i=0;
			for(i=0;i<3; i++){
				cout << *it << endl;
				it++;
			}
	
}

int main()
{
	int m[10] = {1819,2003,876,2840,1723,1673,3776,2848,1592,922};

	Top3Mountains(m);
	return 0;
}

C++: #include<iostream>

int main(){
	
	int h0,h1,h2,h3,h4,h5,h6,h7,h8,h9,k;
	
	std::cin >>h0>>h1>>h2>>h3>>h4>>h5>>h6>>h7>>h8>>h9;
	
	if (h8>h9) k=h8, h8=h9, h9=k;
	
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;
	
	if (h6>h7) k=h6, h6=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;
	
	if (h5>h7) k=h5, h5=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;

	if (h4>h7) k=h4, h4=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;

	if (h3>h7) k=h3, h3=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;	

	if (h2>h7) k=h2, h2=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;

	if (h1>h7) k=h1, h1=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;

	if (h0>h7) k=h0, h0=h7, h7=k;
	if (h7>h8) k=h7, h7=h8, h8=k;
	if (h8>h9) k=h8, h8=h9, h9=k;
	
	std::cout << h9 <<"\n"<< h8 <<"\n"<< h7 <<"\n";
	
	return 0;
	
}