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;
void q_sort(int array[], int begin, int end);

void q_sort(int array[], int begin, int end){
    int i = begin;
    int k = end;
    int pivot;
    int temp;
    pivot = array[(begin + end) / 2];
    while (1) {
        while (array[i] < pivot) {
            ++i;
        }
        while (pivot < array[k]) {
            k--;
        }
        if (i >= k) {
            break;
        }
        temp = array[i];
        array[i] = array[k];
        array[k] = temp;
        i++;
        k--; //check
    }
    if (begin < i - 1) {
        q_sort(array, begin, i - 1);
    }
    if (k + 1 < end) {
        q_sort(array, k + 1, end);
    }
}
int main(int argc, const char * argv[])
{
    int mt[10];
    for (int i = 0; i < 10; i++) {
        cin >> mt[i];
    }
    q_sort(mt, 0, 9);
    for (int i = 9; 6 < i; i--) {
        cout << mt[i] << endl;
    }
    return 0;
}

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

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;
}