Go: package main

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

var maxint = 10000
var scanner = bufio.NewScanner(os.Stdin)

func nextInt() (int, error) {
	scanner.Scan()
	return strconv.Atoi(scanner.Text())
}

func main() {
	scanner.Split(bufio.ScanWords)
	arr := make([]int, 10)
	for i := range arr {
		n, _ := nextInt()
		arr[i] = n
	}

	sort.Slice(arr, func(i, j int) bool {
		return arr[i] >= arr[j]
	})

	arrStr := fmt.Sprintf("%+v", arr[0:3])
	arrStr = arrStr[1:(len(arrStr) - 1)]
	arrStr = strings.Replace(arrStr, " ", "\n", -1)
	fmt.Println(arrStr)
}

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

int main()
{
    int* h = new int[10];

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

    int max1=h[1], max2=h[2], max3=h[3];
    for(int j=0; j<9; j++){
        if(max1 <= h[j+1]){
            max1 = h[j+1]; 
        }
    }
    for(int j=0; j<9; j++){
        if(max2 <= h[j+1] && h[j+1] != max1){
            max2 = h[j+1]; 
        }
    }
    for(int j=0; j<9; j++){
        if(max3 <= h[j+1] && h[j+1] != max1 && h[j+1] != max2){
            max3 = h[j+1]; 
        }
    }

    cout << max1 << endl;
    cout << max2 << endl;
    cout << max3 << endl;
}

C++: #include <iostream>
#include <queue>
#include <vector>
#include <stack>



int main()
{
    int a, b, c;
    std::priority_queue<int, std::vector<int>, std::greater<int>> pq;
    int height, third;
    for (int i = 0; i < 10; i++) {
        //scanf("%d", &height);
        std::cin >> height;
        if (i < 3) {
            pq.push(height);
        } else {
            third = pq.top(); pq.pop();
            if (third < height) pq.push(height);
            else pq.push(third);
        }
    }

    c = pq.top(); pq.pop();
    b = pq.top(); pq.pop();
    a = pq.top(); pq.pop();

    std::cout << a << std::endl;
    std::cout << b << std::endl;
    std::cout << c << std::endl;

    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){

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

    for(int i = 0; i < 4; i++){
        for(int j = i + 1; j < 10; j++){
            if(m[i] < m[j]){
                temp = m[i];
                m[i] = m[j];
                m[j] = temp;
            }
        }
    cout << m[i] << endl;
    }
}

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

using namespace std;

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

C++: #include<iostream>
using namespace std;
int main(){
	int t1,t2,t3,T;
	for(int i;i<10;i++){
		cin>>T;
		if(T>=t1){
			t3=t2;
			t2=t1;
			t1=T;
		}
		else if(T>=t2){
			t3=t2;
			t2=T;
		}
		else if(T>=t3){
			t3=T;
		}
	}
	cout<<t1<<endl<<t2<<endl<<t3<<endl;
	return 0;
}

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

int main() {
  vector <int> a(10);
  int x;
  for (int i = 0; i < 10; i++) {
    cin >> a[i];
  }
  sort(a.begin(), a.end());
  for (int i = 9; i > 6; i--) { 
    cout << a[i] << endl;
  }
  return 0;
}

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

int main(void){
	int a=0, b=0, c=0;
	for(int i=0; i<10; i++){
		int tmp;
		cin >> tmp;
		if(tmp>c){
			if(tmp>b){
				if(tmp>a){
					c=b;b=a;a=tmp;
				}
				else{
					c=b;b=tmp;
				}
			}
			else{
				c=tmp;
			}
		}
	}
	cout << a << endl << b << endl << c << endl;
	return 0;
}

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

int main(){
	int h = 0,m = 0,l = 0,tmp,i;

	for(i = 0;i < 9;i++){
		cin>>tmp;
		if(tmp > h){
			l = m;
			m = h;
			h = tmp;
		}else if(tmp > m){
			l = m;
			m = tmp;
		}else if(tmp > l){
			l = tmp;
		}
	}
	cout<<h<<endl;
	cout<<m<<endl;
	cout<<l<<endl;
	return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int a[11];
int main()
{
	int i,max1=-1,max2=-1,max3=-1;
	for(i=1;i<=10;i++)
	{
		cin>>a[i];
		if(a[i]>max1){max3=max2;max2=max1;max1=a[i];}
		else if(a[i]>max2){max3=max2;max2=a[i];}
		else if(a[i]>max3)max3=a[i];
	}
	cout<<max1<<endl<<max2<<endl<<max3;
	return 0;
}

C++: #include<stdio.h>
int main (void){
	int x1=0,x2=0,x3=0,input,s;
	for(s=0;s<10;s++){
		scanf("%d\n",&input);
		if(x1 < input){
			x3 = x2;
			x2 = x1;
			x1 = input;
		}else{
			if(x2 < input){
				x3 = x2;
				x2 = input;
			}else{
				if(x3 < input){
					x3 = input;
				}
			}
		}
	}
	printf("%d\n%d\n%d\n",x1,x2,x3);
	return(0);
}

C++: #include "stdio.h"

int main(){
  int height[10];
  for(int i = 0; i < 10; i++){
    scanf(" %d", &height[i]);
  }
  for(int numb = 0; numb < 9; numb++){
        for(int num = 0; num < 9-numb; num++){
            if(height[num] < height[num+1]){
                int stock = height[num];
                height[num] = height[num+1];
                height[num+1] = stock;
            }
        }
    }
  for(int a = 0; a < 3; a++){
    printf("%d\n", height[a]); 
  }
  return 0;
}

C++: #include <stdio.h>
#include <vector>
#include <algorithm>

int main(){
	//printf("Hello World!\n");
	std::vector<int> v;
	int x = -1;
	for(int i=0; i<10; i++){
		scanf("%d",&x);
		v.push_back(x);
	}
	std::sort(v.begin(),v.end());
	std::reverse(v.begin(),v.end());
	std::vector<int>::iterator begin = v.begin(); 
	for(int i =0; i<3; i++){
		int h = *begin;
		begin++;
		printf("%d\n",h);
	}

	
	return 0;
}

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

int main()
{
    vector<int> height;
    int buff;
    for(int i=0; i< 10; i++)
    {
        std::cin >> buff;
        height.push_back(buff);
    }
    sort(height.begin(), height.end());
    cout << height[height.size() - 1] << endl;
    cout << height[height.size() - 2] << endl;
    cout << height[height.size() - 3] << endl;
    
    return 0;
}

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

int main(){
	bool completed,flag;
	int result[3],buf,temp[10];
	for(int i = 0; i < 10; i++){
		cin >> temp[i];
	}
	for(int l = 0; l < 3; l++){
		while(1){
			for(int j = l; j < 9; j++){
				if(temp[j] < temp[j+1]){
					buf = temp[j+1];
					temp[j+1] = temp[j];
					temp[j] = buf;
				}
			}
			flag = false;
			for(int k = 0; k < 9; k++){
				if(temp[0] < temp[k]) flag = true;
			}
			if(flag != true){
				result[l] = temp[l];
				break;
			}
		}
	}
	cout << result[0] << endl;
	cout << result[1] << endl;
	cout << result[2] << endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
 
signed main(){
  int a[10]{};
  for(int b=0;b<10;b++){
      scanf("%d",&a[b]);
      }
      sort(a,a+10);
      printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
}

C++: #include <map>
#include <string>
#include <iostream>
#include<vector>
#include <set>
#include<algorithm>

using namespace std;

int main()
{
	multiset<int, greater<int> > heights;
	int height;
	
	for (int i=0; i<10; i++)
	{
		cin >> height;
		heights.insert(height);
	}
	
	multiset<int>::iterator it = heights.begin();
	//while( it != heights.end() )
	for (int i=0; i<3; i++)
	{
		cout << *it << endl;
		++it;
	}
	
	
}

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

int main()
{
  int h1, h2, h3, n;
  h1 = h2 = h3 = 0;
  for(int i = 0; i < 10; i++){
    cin >> n;
    h1 = (i == 0) ? n : h1;
    if(n > h1){
      h3 = h2;
      h2 = h1;
      h1 = n;
    }else{
      if(n > h2){
	h3 = h2;
	h2 = n;
      }else{
	if(n > h3){
	  h3 = n;
	}
      }
    }
  }
  cout << h1 << endl << h2 << endl << h3 << endl;
}