Go: package main

import "fmt"

func main() {
	var height int
	topHeights := [5]int{}

	for i := 0; i < 10; i++ {
		fmt.Scan(&height)

		for j := 0; j < 3; j++ {
			if topHeights[j] < height {
				topHeights[j+2] = topHeights[j+1]
				topHeights[j+1] = topHeights[j]
				topHeights[j] = height
				break
			}
		}
	}

	for i := 0; i < 3; i++ {
		fmt.Println(topHeights[i])
	}
}

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

using namespace std;

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

	return 0;
}

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

void swap(int &x, int &y) {
	int a;
	a = x;
	x = y;
	y = a;
}

int main() {
	int a[10],max,mid,min;
	for (int i=0; i<10; i++) {
		cin >> a[i];
	}
	max = a[0];
	mid = a[1];
	min = a[2];
	if (mid > max) {
		swap(max, mid);
	}
	if (mid < min) {
		swap(mid, min);
	}
	for (int j=3; j<10; j++) {
		if (a[j] > max) {
			min = mid;
			mid = max;
			max = a[j];
		}else if (a[j] > mid) {
			min = mid;
			mid = a[j];
		}else if (a[j] > min) {
			min = a[j];
		}
	}
	cout << max << endl << mid << endl << min << endl;
}

C++: #include<iostream>
#include<algorithm>
int x[10];
int main(){
	for(int i=0;i<10;++i){
		std::cin>>x[i];
	}
	std::sort(std::begin(x),std::end(x));
	for(int i=0;i<3;++i){
		std::cout<<x[9-i]<<std::endl;
	}
	return 0;
}

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

int main(){
    
    int i;
    int max1, max2, max3;
    std::array <int, 10> hill;
    
    max2 = 0;
    max3 = 0;

    for (i = 0; i < 10; ++i) {
        std::cin >> hill.at(i);
        
        if (i == 0) max1 = hill.at(0);
        
        if (max1 < hill.at(i)) { 
            max2 = max1;                    
            max1 = hill.at(i);
        } else if (max2 < hill.at(i)) {
            max3 = max2;
            max2 = hill.at(i);
        } else if (max3 < hill.at(i)) max3 = hill.at(i);
        else {}
    }
    
    std::cout << max1 << std::endl << max2 << std::endl << max3 << std::endl;
    
    return 0;
}

C++: int main() {
	typedef unsigned short int mew;
	mew mountain[10];
	for (int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}

	mew taller[3];
	mew a, b, c;

	a = mountain[0];
	b = mountain[1];
	c = mountain[2];

	for (int y = 3; y <= 9; y++) {
		if (a<=b){
			if (a<=c){
				if (a < mountain[y]) {
				???a = mountain[y];}
			}
			else{
				if (c < mountain[y]) {
					c = mountain[y];}
			}
		}
		else if (b<=c)
		{
			if (b < mountain[y]) {
				b = mountain[y];}
		}
	}

	//biggest->taller[0],bigger->taller[1],taller[2]
	{
		if (a >= b&&a >= c)
		{
			taller[0] = a;
			if (b >= c)
			{
				taller[1] = b;
				taller[2] = c;
			}
			else {
				taller[1] = c;
				taller[2] = b;
			}
		}
		if (b >= a&&b >= c)
		{
			taller[0] = b;
			if (a >= c)
			{
				taller[1] = a;
				taller[2] = c;
			}
			else {
				taller[1] = c;
				taller[2] = a;
			}
		}
		if (c >= b&&c >= a)
		{
			taller[0] = c;
			if (b >= a)
			{
				taller[1] = b;
				taller[2] = a;
			}
			else {
				taller[1] = a;
				taller[2] = b;
			}
		}
	} 

	cout << taller[0] << endl;
	cout << taller[1] << endl;
	cout << taller[2] << endl;

        char a____;
	cin >> a____;

	return 0;
}

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

int main()
{
  vector<int> v(10);
  for (int i = 0; i < 10; i++)
    cin >> v[i];
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  for (int i = 0; i < 3; i++)
    cout << v[i] << endl;

  return 0;
}

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <vector>
#include <math.h>
#include <string>
#include <string.h>
#include <stack>
#include <algorithm>
#include <stdio.h>
#include <functional>
using namespace std;

//??°?????????????????°

void function()
{
    //??¢??°
}
 
int main(){
    int max1 = 0;
    int max2 = 0;
    int max3 = 0;
    for (int i = 0; i < 9; i++){
    	int a;
		cin >> a;
		if(a >= max1){
		max3 = max2;
		max2 = max1;
		max1 = a;
		}else if(a >= max2){
			max3 = max2;
			max2 = a;
		}else if(a >= max3){
			max3 = a;
		}
    }
    cout << max1 << endl << max2 << endl << max3 << endl;
    return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
int H[10];
int main() {
	for (int i = 0; i < 10; i++) {
		cin >> H[i];
	}
	sort(H, H+10,greater<int>());
	for (int i = 0; i <3 ; i++) {
		cout << H[i] << endl;
	}
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
    
int main(){
	int data,m[10];

	
	for (int j=0;j<=9;j++){
			while(cin >> data){
			if (data<=10000 && data >= 0 ) {
			m[j]=data;
			break;
		}
			}
	}

for (int i=0;i<=9;i++){

	if (m[i] < m[i+1]){
		swap(m[i],m[i+1]);
	for (int j=i;j>0;j--){
	if (m[j] > m[j-1])
		swap(m[j],m[j-1]);
	}
	}
}


 
for (int i=0;i<=2;i++){
cout <<  m[i] <<'\n';
}

    return 0;
}

C++: #include <stdio.h>


int main(){
	int h[3]={0,0,0};
	int c,i;
	for(i=0;i<10;i++){
		scanf("%d",&c);
		if(c>h[0]){
			h[2]=h[1];
			h[1]=h[0];
			h[0]=c;
		}else if(c>h[1]){
			h[2]=h[1];
			h[1]=c;
		}else if(c>h[0]){
			h[2]=c;
		}
	}
	for(i=0;i<2;i++){
		printf("%d ",h[i]);
	}printf("%d\n",h[i]);
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>
#include <cctype>
#include <string>
#include <cmath>
#include <algorithm>
#define DATA_NUM 10
#define swap(type, x, y) do{ type temp = x; x = y; y = temp;}while(0);

using namespace std;

void quick_sort(int x[], int left, int right);
int main(void) {
    int x[10] = {0};
    int i;
    
    for(i = 0; i < DATA_NUM; i++)
        scanf("%d", &x[i]);
    
    quick_sort(x, 0, DATA_NUM - 1);
    
    for(i = DATA_NUM - 1; i > 6; i--)
        cout << x[i] << endl;
    
    return(0);
}

void quick_sort(int x[], int left, int right) {
    int i, j;
    int pivot;
    
    i = left;
    j = right;
    
    pivot = x[(left + right) / 2];
    
    while(1) {
        while(x[i] < pivot) i++;
        while(x[j] > pivot) j--;
        
        if(i >= j) break;
        
        swap(int, x[i], x[j]);
        i++;
        j--;
    }
    if(i - 1 > left) quick_sort(x, left, i - 1);
    if(j + 1 < right) quick_sort(x, j + 1, right);
}

C++: using System;
using System.Linq;
namespace _0001
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] a = Console.ReadLine().Split().Select(int.Parse).ToArray();       
                int[] mountain = new int[] { a[0],a[1],a[2] };
            Array.Sort(mountain);
            Console.WriteLine(mountain[0]+" "+mountain[1]+" "+mountain[2]);
        }
    }
}

C++: import java.util.*;

public class Main{
    
    public static void main(String[] args){
        
        int[] hill={0,0,0,0,0,0,0,0,0,0};
        
        for(int j=0;j<=9;j++){
            hill[j]=new Scanner(System.in).nextInt();
        }
        
        int key;
        int flag;
        
        for(key=9;key>=0;key--){
            
            for(int i=0;i<=key-1;i++){
                if(hill[i]>hill[i+1]){
                    flag=hill[i];hill[i]=hill[i+1];hill[i+1]=flag;
                }
            }
            
        }
        
        System.out.println(hill[9]);
        System.out.println(hill[8]);
        System.out.println(hill[7]);
        
        
        
    }
    
}

C++: #include<iostream>

int main(){
	int f=0,s=0,t=0,num,tmp;
	
	for(int i=0;i<10;i++){
		cin>>num;
		if(num>t){
			t=num;
		}
		if(t>s){
			tmp=s;
			s=t;
			t=tmp;
		}
		if(s>f){
			tmp=f;
			f=s;
			s=tmp;
		}
		
	}
	cout << f << endl << s << endl << t << endl;
	
	return 0;
}