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>
using namespace std;

int *bubblesort(int a[]) {
	for (int i=0; i < 10; i++) {
		for (int j=0; j < 10 -1- i; j++) {
			if (a[j] < a[j+1]) {
				int temp = a[j];
				a[j] = a[j+1];
				a[j+1] = temp;
			}
		}
	}
	return a;
}

int main() {
	int a[10];
	for (int i = 0;i < 10; i++) {
		cin >> a[i];
	}
	int *b = bubblesort(a);
	for (int t=0; t<3; t++) {
		cout << b[t] << endl;
	}
}

C++: #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
int n;
using namespace std;
int main(){
	priority_queue <int > dp;

	while(cin>>n){
		dp.push(n);
	}
	for(int i=0;i<3;i++){
		int output=dp.top();
		dp.pop();
		cout<<output;
	}
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#define add push_back
#define inf 2147000000

using namespace std;

int main(void){
	int yama[10];
	
	for(int i=0;i<10;i++){
		scanf("%d",&yama[i]);
	}
	
	sort(yama,yama+10);
	
	for(int i=9;i>=7;i--){
		printf("%d\n",yama[i]);
	}
}

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

int main(){
	std::vector<int> v;
	for (auto i = 0; i < 10; ++i){
		int t;
		std::cin >> t;
		v.push_back(t);
	}
	std::sort(v.begin(), v.end());
	for (auto i = 0; i < 3; ++i){
		std::cout << v[i] << std::endl;
	}

	return 0;
}

C++: #include "stdio.h"
int main()
{
    int a,b,c,x,i;
    a=b=c=-1; i=10;
    while(i--){
        scanf("%d",&x);
        if(x>=a){
            c=b; b=a; a=x;
        }
        else if(x>=b){
            c=b; b=x;
        }
        else if(x>c)
            c=x;
    }
    printf("%d\n%d\n%d\n",a,b,c);
    return 0;
}

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long ull;
typedef long long ll;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

typedef pair<int ,int > P;

vector<int> vec;

int main()
{
	rep(i,10)
	{
		int a;
		cin>>a;
		vec.pb(a);
	}
	sort(all(vec));

	cout<<vec[9]<<endl;
	
	cout<<vec[8]<<endl;

	cout<<vec[7]<<endl;

	return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>

#define NUM 10

int comp(const void *, const void *);

int comp(const void *x, const void *y) {

    return *(const int *)x - *(const int *)y;
    
}

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

	int i = 0;
    int Mt[NUM] = {0};

	for(i=0; i<NUM; i++) {
		fscanf(stdin, "%d", &Mt[i]);
	}
	
	qsort(Mt, NUM, sizeof(int *), comp);
	
	for(i=NUM; i>7; i--) {
		fprintf(stdout, "%d\n", Mt[i-1]);
	}

    return 0;

}

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



int main() {

//変数の宣言

	int i,j,temp;
	vector<int> hight;


/////メイン処理/////

	for(i=0;i<10;i++){
		cin >> temp;
		hight.push_back(temp);
	}
	
	for(j=0;j<hight.size()-1;j++){
		for(i=0;i<hight.size()-1-j;i++){
			if (hight[i] > hight[i+1]) {
				temp = hight[i];
				hight[i] = hight[i+1];
				hight[i+1] = temp;
			}
		}
	}
	
	for(i=0;i<3;i++){
		cout << hight[hight.size() -i -1] <<endl;
	}
	
	return 0;
}

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

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

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

void SimpleSort(int* array,int n){
    int temp = 0;
    int i = 0;
    int j = 0;

    for(int i=0;i<n-1;i++){
        for(int j=i+1;j<n;j++){
            if(array[i]<array[j]){
                temp = array[i];
                array[i]=array[j];
                array[j]=temp;
            }
        }
    }
    return ;
}

int main(){
    int array[10];

    for(int k=0;k<10;k++){
        cin >> array[k];
    }

    SimpleSort(array,10);

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

    return 0;
}

C++: #include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <map>
#include <sstream>
#include <queue>
#include <cstdlib>
#include <algorithm>
#include <iterator>
#include <stack>
#include <list>
using namespace std;
#define INF 100000000
typedef long long int lli;
typedef pair<int,int> P;
int dp[100][100];

int main (){
	int top[3];
	for(int i=0 ;i<3; ++i){
		top[i]=0;
	}
	for(int i=0; i<10; ++i){
		int tmp;
		cin >> tmp;
		for(int j=0; j<3; ++j){
			if(top[j]<tmp){
				swap(top[j],tmp);
			}
		}
	}
	for(int i=0; i<3; ++i){
		cout << top[i] << "\n";
	}
	return 0;
}

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

int main() {
	int h, s, t, a;
	h = 0;
	s = 0;
	t = 0;
	for (int i = 1; i <= 10; i++) {
		cin >> a;
		if (h < a) {
			swap(a,h);
		}
		if (s < a) {

			swap(s,a);

		}
		if (t < a) {

			swap(t,a);

		}
	}
	cout << h << endl;
	cout << s << endl;
	cout << t << 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,desc);
	
	for(int i = 0; i < 3; i++){
		cout << h[i] << endl;
	}
	
    return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n)for(int i=0;i<n;i++)
using namespace std;
typedef long long ll;

int main() {
	int a[10];
	rep(i, 10) {
		cin >> a[i];
	}
	sort(a, a + 10);
	cout << a[9] << endl << a[8] << endl << a[7] << endl;
	return 0;
}

C++: 

#include <iostream>

using namespace std;

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

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

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

int main(){
    std::set<int> s = {1819, 2003, 876, 2840, 1723, 1673, 3776, 2848, 1592, 922};
    auto itr = s.begin();
    for(int i = 0; i < 3; ++i) {
        std::cout << *itr << std::endl;
        ++itr;
    }
    return 0;
}

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

int main(){
	int max1=-1,max2=-1,max3=-1;
	for(int i=0;i<10;i++){
		int n;
		cin >> n;
		if (max1<n){
			max3=max2;
			max2=max1;
			max1=n;
		}
		else if (max2<n){
			max3=max2;
			max2=n;
		}
		else if (max3<n){
			max3=n;
	}
	}
	cout << max1 << endl <<max2 <<endl << max3 <<endl; 
	return 0;
}

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

int main() {
	int m[10];

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

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

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

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    vector<int> yama(10);
    for(int i=0;i<10;i++){
        cin >> yama[i];
    }
    sort(yama.begin(),yama.end());
    cout << yama[9] << "\n" << yama[8] << "\n" << yama[7] << "\n";
}