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<string>
#include<vector>
#include<cmath>
#include<queue>
using namespace std;

int main(){
	
	priority_queue<int>Q;

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

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

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<stack>
#include<map>
#include<set> 
using namespace std;
int main(){
	int n,m;
	//cin>>n;
	int h[10];
	for(int i=0;i<=9;i++)
	cin>>h[i];
	sort(h,h+10);
	for(int i=9;i>=7;i--)
	cout<<h[i]<<endl;
	//system("pause");
	return 0;
}

C++: #include<iostream>

using namespace std;

int height[10];

int main(void)
{
	for(int i=0;i<10;i++){
		cin>>height[i];
	}
	for(int i=0;i<10;i++){
		int max=i;
		for(int j=i+1;j<10;j++){
			if(height[max]<height[i]){
				max=j;
			}
		}
		int tmp=height[i];
		height[i]=height[max];
		height[max]=tmp;
	}
	for(int i=0;i<3;i++){
		cout<<height[i]<<endl;
	}
}

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

int main()
{
	int H[10],temp,it;
	for(int i = 0;i < 10;i++)
		cin >> H[i];
	for(int j = 0;j < 3;j++){
		temp = 0;
		for(int i = 0;i < 10;i++)
			if(temp < H[i]){
				temp = H[i];
				it = i;
			}
		cout << temp << endl;
		H[it] = 0;
	}
	return 0;
}

C++: #include<stdio.h>
int main(void){
    int d,m1=0,m2=0,m3=0,i;
    for(i=0;i<10;i++){
        scanf("%d",&d);
        if(d>m1){
            m3=m2;
            m2=m1;
            m1=d;
        }else if(d>m2){
            m3=m2;
            m2=d;
        }else if(d>m3){
            m3=d;
        }
    }
    printf("%d\n",m1);
    printf("%d\n",m2);
    printf("%d\n",m3);
    return 0;
}

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

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

using namespace std;

int main() {
    int a=0, b=0, c=0;
    for(int i = 0; i < 10; ++i) {
        int temp;
        scanf("%d",&temp);
        if(temp>a) {
            c = b;
            b = a;
            a = temp;
        } else if(temp > b) {
            c = b;
            b = temp;
        } else if(temp > c) {
            c = temp;
        } else {
        }
    }
    printf("%d\n",a);
    printf("%d\n",b);
    printf("%d\n",c);
}

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

int main() {
	int tall;
	int top[3];

	for(int i=0;i<3;i++){
		top[i] = 0;
	}

	for(int i=0;i<10;i++){
		scanf("%d",&tall);
		if(tall >= top[0]){
			top[2] = top[1];
			top[1] = top[0];
			top[0] = tall;
		}else if(tall >= top[1]){
			top[2] = top[1];
			top[1] = tall;
		}else if(tall >= top[2]){
			top[2] = tall;
		}
	}

	for(int i=0;i<3;i++)
		printf("%d\n",top[i]);
	
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <stdlib.h>
#define N 10
int main(int argc, const char * argv[])
{
    int x=0;
    int max1=-1;
    int max2=-2;
    int max3=-3;
    
    for(int j=0; j<N; j++){
        scanf("%d\n",&x);
        if(max1<=x){
            max3=max2;
            max2=max1;
            max1=x;
        }else if(max2<x){
            max3=max2;
            max2=x;
        }else if(max3<x){
            max3=x;
        }
        printf("%d\n",max1);
        printf("%d\n",max2);
        printf("%d\n",max3);

    }
}

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

int main()
{
	int m[11], i, j, work;
	for(i=0; i<10; i++)
	{
		cin >> m[i];
	}
	for(i=0; i<10; i++)
	{
	 	for(j=0; j<10; j++)
		{
	    	if(m[i] > m[j])
			{
	   			work = m[i]; m[i] = m[j]; m[j] = work;
	   		}
	  	}
	}
	for(i=0; i<3; i++)
	{
	 	cout << m[i] << endl;
	}
	return 0; 
}

C++: #include<iostream>
#include<vector>
int main() {
	std::vector<int> h(10);
	std::vector<int> mh(3);
	for (int i = 0; i < 10; ++i)std::cin >> h[i];
	for (int i = 0; i < 3; ++i) mh[i] = 0;
	for (int i = 1; i < 10; ++i) {
		if (mh[0] < h[i])mh[0] = h[i], h[i]=0;
	}
	for (int i = 1; i < 10; ++i) {
		if (mh[1] < h[i])mh[1] = h[i], h[i] = 0;
	}
	for (int i = 1; i < 10; ++i) {
		if (mh[2] < h[i])mh[2] = h[i], h[i] = 0;
	}
	for (int i = 0; i < 3; ++i)std::cout << mh[i] << std::endl;
	return 0;
}

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(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 <stdio.h>
#include <math.h>
#include <iostream>
using namespace std;

int main(void){
	int x[10],top[3];
	int i;

	for(i=0;i<3;i++){
		top[i] = 0;
	}
	for(i=0;i<10;i++){
		std::cin >> x[i];
		if(top[0] < x[i]){
			top[2] = top[1];
			top[1] = top[0];
			top[0] = x[i];
		}
	}

	std::cout << top[0] << "\n" << top[1] << "\n" <<top[2] << "\n";
	return 0;
}

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

int main(){
	int mount[10];
	int i;
	for (i = 0; i < 10; i++) {
		cin >> mount[i];
	}
	int top = 0;
	int second = 0;
	int third = 0;

	for (i = 0; i < 10; i++) {
		if (third <= mount[i]){
			third = mount[i];
			if (second < mount[i]){
				third = second;
				if (top <= mount[i]){
					second = top;
					top = mount[i];
				}
				else
				{
					second = mount[i];
				}
			}
		}
	}

	cout << top << endl << second << endl << third << endl;
	cin >> i;
	return 0;
}

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

int main(){
    vector<int> a;
    int b;
    while(cin >> b)
        a.push_back(b);
    sort(a.rbegin(),a.rend());
    for(int i = 0; i<3; i++)
        cout << a[i] << endl;
    return 0;
}

C++: #include <cstdio>

using namespace std;

inline void sort(int* a, int n) {
    for (int i = 0; i < n; i ++) {
        for (int j = i; j < n; j ++) {
            if (a[i] < a[j]) {
                int tmp = a[i];
                a[i] = a[j];
                a[j] = tmp;
            }  
        }
    }
}

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

    for (int i = 0; i < 3; i ++) {
        printf("%d\n", a[i]);
    }

}

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

using namespace std;

int main(void)
{
	array<int, 10> input;

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

	sort(begin(input), end(input), less<int>());

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


	return 0;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
	int a = 0,b=0,c=0,d=0;
	for (int i = 0; i < 10;i++){
		cin >> a;
		if (a>b){
			a = b;
			b = c;
			c = d;

		}

	}
	cout << b << endl << c << endl << d;
	return 0;
}

C++: #include<stdio.h>

int main()
{
	int mt[10],i,top[3],j,a;
	for(i=0;i<10;i++){
		scanf("%d",&mt[i]);
	}
	
	for(i=0;i<9;i++){
		for(j=0;j<9-i;j++){
			if(mt[j]>mt[j+1]){
				a=mt[j];
				mt[j]=mt[j+1];
				mt[j+1]=a;
			}
		}
	}
	
	printf("%d\n%d\n%d\n",mt[9],mt[8],mt[7]);
	return 0;
}

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

int main(){
	cin.tie(0),ios::sync_with_stdio(false);
	vector<int>v(10); for(auto&&i:v)cin>>i;
	sort(v.rbegin(),v.rend());
	for(auto i=v.begin();i!=v.begin()+3;++i)cout<<*i<<"\n"s;
}