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>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <queue>
#include <stack>
#include <cmath>
#include <cstdio>
#include <string>
#include <sstream>

using namespace std;

#define rep(i, n) for(int i = 0; i < (int)n; ++i)
#define repn(i, n) for(int i = 1; i <= (int)n; ++i)
#define pb push_back
#define lb lower_bound
#define mp make_pair
#define ite iterator
#define max2(x, y) ((x) > (y)) ? (x) : (y)
#define max3(x,y,z) max2((x), max2((y),(z)))
#define max4(v,w,x,y) max2(max2((v),(w)), max2((x),(y)))
#define min2(x, y) ((x) > (y)) ? (y) : (x)
#define min3(x,y,z) min2((x), min2((y),(z)))
#define min4(v,w,x,y) min2(min2((v),(w)), min2((x),(y)))
#define ul unsigned long
#define ull unsigned long long
#define INF 1000000007
#define MOD 1000000007
#define fs first
#define sd second

template<typename T>
bool elem(set<T> st, T val){
	return (st.find(val) != st.end());
}

template<typename T>
void printv(vector<T> vt){
    rep(i, vt.size() - 1)
        cout << vt[i] << " ";
    cout << vt[vt.size() - 1] << endl;
}

typedef vector<int> vint;
typedef vector<ul> vul;
typedef vector<ull> vull;
typedef pair<int, int> pii;

int main(void){
    vint a;
    int d;
    while(cin >> d) a.pb(d);
    sort(a.begin(), a.end(), greater<int>());
    rep(i, 3)
        cout << a[i] << endl;
    return 0;
}

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

int main()
{
  int high;
  int temp1,temp2;
  int first=0,second=0,third=0;
  
  for(int i=0;i<10;i++){
    cout<<"山の高さ"<<i<<":";
    cin>>high;
    if(high>first){
      temp1=first;
      first=high;
      temp2=second;
      second=temp1;
      third=temp2;
    } else if (first>=high && high>second){
      temp2=second;
      second=high;
      third=temp2;
    } else if (second>=high && high>third){
      third=high;
    }
  }

  cout<<"1番目に高い山の高さ:"<<first<<endl;
  cout<<"2番目に高い山の高さ:"<<second<<endl;
  cout<<"3番目に高い山の高さ:"<<third<<endl;
  
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main()
{
    vector<int>vec;
    for(int i = 0;i < 10;++i)
    {
        int v; cin << v;
        vec.push_back(v);
    }
    sort(vec.begin(),vec.end());
    cout << vec[9] <<endl<< vec[8] <<endl << vec[7] <<endl;
    return 0;
}

C++: #include <iostream>

int main(){
	int m,mf=0,ms=0,mt=0;
	for(int a=0;a<10;a++){
		std::cin>>m;
		if(m>mf){
			mt=ms;
			ms=mf;
			mf=m;
			m=0;
	    }
		if(m>ms){
			mt=ms;
			ms=m;	
			m=0;
		}
			
		if(m>mt){
			mt=m;
			
		}
			
		
	}
	std::cout<<mf<<std::endl<<ms<<std::endl<<mt;
	return 0;
}

C++: #include<stdio.h>
         
int main(void){
    /* 宣言と初期化 */
    int hai[10];
    int id[2];
    int i;
    int temp2nd;
    int temp3rd;
    int tempmax;
         
for(i=0;i<10;i++)
{
scanf("%d",&hai[i]);
}
    /* 代入 */
    temp2nd=hai[0];
    tempmax=hai[0];
    temp3rd=hai[0]; 
    /* 計算 */
    for(i=0;i<10;i++){
        /* 最大値求める */
        if(hai[i]>tempmax)
       {tempmax=hai[i];id[0]=i;}
    }
    for(i=0;i<10;i++){
        /*2番目求める */
        if(hai[i]<tempmax&&hai[i]>temp2nd&& i=! id[0])
        {temp2nd=hai[i];id[1]=i;}
    }   
    for(i=0;i<10;i++){
        /* 3番目求める */
        if(hai[i]>temp3rd&&hai[i]<temp2nd && i =! id[1] && i =! id[0])
       {temp3rd=hai[i];}
    }
         
    /* 表示 */
    printf("最も高い山の高さ　%d\n",tempmax);
    printf("２番目に高い山の高さ　%d\n",temp2nd);
    printf("３番目に高い山の高さ　%d\n",temp3rd);
         
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int array[10],tmp;
  for(int i = 0;i<10;i++)
    cin >> array[i];
  for(int i=0;i<10;i++){
    for(int k=0;k<9;k++){
      if(array[k] < array[k+1]){
	tmp = array[k]; array[k] = array[k+1]; array[k+1] = tmp;
      }
    }
  }
  for(int i =0 ;i< 3;i++){
    cout << array[i] << endl;
} 
}

C++: #include<stdio.h>
int main(void){
  int high[10]={},i;
  int max=0;
  int sec=0;
  int thi=0;
 
  for(i=0;i<10;i++){
    scanf("%d",&high[i]);
  }
 
  for(i=0;i<10;i++)
    if(max<high[i])
      max=high[i];
   
  for(i=0;i<10;i++)
    if(high[i]<max && sec<high[i])
      sec=high[i];
 
  for(i=0;i<10;i++)
    if(high[i]<sec && thi<high[i])
      thi=high[i];
 
  printf("%d\n%d\n%d\n",max,sec,thi);
 
  return 0;
}

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

int main(){
  int array[10];
  
  for(int i=0; i<10; i++){
    std::cin >> array[i];
  }
  
  std::vector<int> vector(array, array+10);
  std::sort(vector.begin(), vector.end());
  for(int i=0; i<3; i++){
    std::cout << vector[i] << std::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 <iostream>
#include <vector>
#include <algorithm>
#include <functional>

bool compare(int a, int b) {
    return a < b;
}

int main(void) 
{
    int i;
    std::vector<int> hs(0, 10);

    for (i = 0; i < 10; i++) {
        std::cin >> hs[i];
    }

    std::sort(hs.begin(), hs.end(), std::greater<int>());

    for (i = 0; i < 3; i++) {
        std::cout << hs[i] << "\n";
    }

    return 0;
}

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

int main(int argc, const char * argv[]) {
    
    vector<int> heights(10);
    for (int i=0; i<10; i++){
        cin >> heights[i];
    }
    sort(heights.begin(), heights.end(), greater<int>());
    
    for (int i=0; i<3; i++){
        cout << heights[i] << endl;
    }
    
    return 0;
}

C++: #include<stdio.h>
#define N 10

int main()
{
    int i, j, n, a=0;
    int A[N];

    for(i=0;i<10;i++){
        scanf("%d", &n);
        A[i] = n;
    }   
    for(i=0;i<3;i++){
        n = A[i];
        for(j=i+1;j<N;j++){
            if(n<A[j]){
                n = A[j];
                a = j;//max_index
            }   
        }   
        n = A[i];
        A[i] = A[a];
        A[a] = n;
        printf("%d\n",A[i]);
    }   
    return 0;
}

C++: #include<iostream>
#include<algorithm>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
 
int main(){
  int a[10];
  rep(i,10){
    cin >> a[i];
    a[i] = -1*a[i];
  }

  sort(a, a+10);
 
  rep(i,3) cout << -1 * a[i] << endl;
 
     
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <cmath>
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.rbegin(), H.rend());
	for (int i = 0; i <3 ; i++) {
		cout << H[i] << endl;
	}
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
//#include<function>

using namespace std;

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