Go: package main

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

var sc = bufio.NewScanner(os.Stdin)

func main() {
	heights := make([]int, 10)
	for i := 0; i < 10; i++ {
		sc.Scan()
		heights[i], _ = strconv.Atoi(sc.Text())
	}

	sort.Sort(sort.Reverse(sort.IntSlice(heights)))
	for i := 0; i < 3; i++ {
		fmt.Println(heights[i])
	}
}

C++: #include <cstdio>
int main(){
 int top3[3];
 int i,tmp,data;
 for(i=0;i<3;i++) top3[i]=0;
 for(i=0;i<10;i++){
  scanf("%d",&data);
  if (top3[2]>data) {} 
  else {
   top3[2]=data;
   if (top3[1]>data) {} 
   else {
    top3[2]=top3[1];
    if (top3[0]>data) top3[1]=data;
    else {
     top3[1]=top3[0];
     top3[0]=data;
    };
   };
  };
 };
 for(i=0;i<3;i++)
    printf("%d\n",top[i]);
 return 0;
};

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>


using namespace std;

int main(void) {
	int buf;
	vector<int> v(10);
	for(int i = 0; i < 10; i++){
		cin >> buf;
		v[i] = buf;
	}
	sort(v.begin(), v.end());
	cout << v[9] << endl;
	cout << v[8] << endl;
	cout << v[7] << endl;
}

C++: a[],i;
c(int*a){a=*a-*1[&a];}
main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}

C++: #include<stdio.h>
int main(){
int a[10],b=0,c;
for(int i=0;i<10;i++){
scanf("%d",&a[i]);
}
for(int i=0;i<3;i++){
for(int j=0;j<10;j++){
if(a[j]>b){
b=a[j];
c=j;
}
}
printf("%d\n",b);
b=0;
a[c]=0;
}
return 0;
}

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

int main()
{
  int a[10];
  vector<int>m;

  for(int i=0; i<10; i++)
  {
    cin>>a[i];
    m.push_back(a[i]);
  }

  sort(m.begin(),m.end(),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(void){
    int num, i;
    string str;
    vector<int> v;
    v.resize(10);

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

    sort(v.begin(), v.end());
    for(int i = 1; i < 4; i++){
        cout << v[v.size() - i] << endl;
    }
}

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

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(0);

    std::priority_queue<int> pq;
    for(int i=0; i<10; ++i){
        int input;
        std::cin >> input;
        pq.push(input);
    }
    for(int i=0; i<3; ++i){
        std::cout << pq.top() << "\n"; pq.pop();
    }
    return 0;
}

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

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

C++:  #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 
 using namespace std;

 int main()
 {
   int first,second,third;
   first=second=third=0;
   int N;
   while(cin>>N)
   {
     if(first<N) first=N;
     else if(second<N) second=N;
     else if(third<N) third=N;                 
   }
   cout<<first<<endl;
   cout<<second<<endl;
   cout<<third<<endl;
   //while(1);      
   return 0;    
 }

C++: #include<iostream>

using namespace std;

int main()
{
	int sum,heights[10];
	for(int i = 0; i<10;i++)
	{
		cin>>heights[i];
	}
	for(int i = 1;i<10;i++)
		if(heights[i]>heights[0])
		{
			sum = heights[i];
			heights[i] = heights[0];
			heights[0] = sum;
		}
		//heights[0] = heights[i]>heights[0]?heights[i]:heights[0];
	for(int i = 2;i<10;i++)
		if(heights[i]>heights[1])
		{
			sum = heights[i];
			heights[i] = heights[1];
			heights[1] = sum;
		}
		//heights[1] = heights[i]>heights[1]?heights[i]:heights[1];
	for(int i = 3;i<10;i++)
		if(heights[i]>heights[2])
		{
			sum = heights[i];
			heights[i] = heights[2];
			heights[2] = sum;
		}
		//heights[2] = heights[i]>heights[2]?heights[i]:heights[2];
	cout<<heights[0]<<endl;
	cout<<heights[1]<<endl;
	cout<<heights[2]<<endl;
	return 0;
}

C++: #include<iostream>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<stack>
#include<queue>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define eps 1e-6
#define INF (1<<20)
#define PI acos(-1.0)
#define MAX 100005
#ifdef LOCAL
//#include<windows.h>
#endif // LOCAL
using namespace std;

int main(int argc,char argv[])
{
    #ifdef LOCAL
    freopen("in.txt","r",stdin);
    //freopen("out.bat","w",stdout);
    #endif // LOCAL
    vector<int> v;
    v.reserve(10);
    for(int i(0);i!=10;++i)
    {
        int x;
        scanf("%d",&x);
        v.push_back(x);
    }
    sort(v.begin(),v.end(),greater<int>());
    printf("%d\n%d\n%d\n",v[0],v[1],v[2]);
    return 0;
}

C++: #include<iostream>

#define     MAX_NUMBER              10
#define     MOUNTAIN_HEIGHT_MIN     0
#define     MOUNTAIN_HEIGHT_MAX     10000
#define     MAX_SHOW_NUMBER         3

using namespace std;

int main(){
	int i,j;
	int num[MAX_NUMBER];
	bool flag;

	// MAX_NUMBER の値をチェック (プログラマのミスを防ぐ)
	if(((int)MAX_NUMBER) <= 0){
		cerr << "エラー：MAX_NUMBERの値が0以下です" << endl;
		return -1;
	}

	// 値の入力・チェック
	for(i=0;i<((int)(MAX_NUMBER));i++){
		// 値の入力
		cin >> num[i];
		// 値のチェック
		if(num[i] < ((int)MOUNTAIN_HEIGHT_MIN)){
			cerr << "エラー：" << i <<"番目の山の高さが" << ((int)MOUNTAIN_HEIGHT_MIN) << "メートル未満です" << endl;
			return -1;
		}else if(num[i] > ((int)MOUNTAIN_HEIGHT_MAX)){
			cerr << "エラー：" << i <<"番目の山の高さが" << ((int)MOUNTAIN_HEIGHT_MAX) << "メートルより大きいです" << endl;
			return -1;
		}
	}

	// 並び替えループ
	do{
		flag = false;
		for(i=0;i < (((int)(MAX_NUMBER)) - 1);i++){
			if(num[i] < num[i+1]){
				j = num[i];
				num[i] = num[i+1];
				num[i+1] = j;
				flag = true;
			}
		}
	}while(flag == true);

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

	return 0;
}

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

int main(){
	int i,j,a[10],t;
	for(i=0;i<10;i++)
	{
		cin>>a[i];
	}
	for(i=0;i<9;i++)
		for(j=i+1;j<10;j++)
			if(a[i]<a[j])
		   {
			  t=a[i];
			  a[i]=a[j];
			  a[j]=t;
		  }
	for(i=0;i<3;i++)
	{
		cout<<a[i]<<endl;
	}
    return 0;
}

C++: #include <stdio.h>
#include <stdlib.h>
#define MAXN 10
typedef struct DNode
{
  int data;
  DNode *next;	
}llist;
void creatlist(llist*&head,int a[],int n)
{
	llist *pre,*q;
	head=(llist *)malloc(sizeof(llist));
	pre=head;
	for(int i=1;i<=n;i++)
	{
	 q=(llist *)malloc(sizeof(llist));
	 q->data=a[i];
     pre->next=q;
     pre=q; 
	}
	pre->next=NULL;
}
void swapi(llist*&L)
{
 llist *q,*p;
 q=L->next;
 p=L->next->next;
 q->next=NULL;
 L->next=p;
 q->next=p->next;
 p->next=q;  	
}

bool sorti(llist*&L)
{
  llist *p,*q;
  p=L->next;
  q=L;
  int count=0,c2;
  while(p->next!=NULL)
  {
   count++;
   p=p->next;	
  }
  c2=count;
  if(L->next->next==NULL&&L->next==NULL)
  return 0;
  else
  {
  	while(count--)
  	{
  		c2=count+1;
 	  while(c2--)
 	  {
  	 	if(q->next->data<q->next->next->data)
  	 	swapi(q);
		q=q->next; 	
  	  }
  	   q=L;
    }
  }	
}
int main()
{
    int a[MAXN];
    llist *p;
    for(int i=1;i<=MAXN;i++)
    scanf("%d",&a[i]);
    creatlist(p,a,MAXN);
    sorti(p);
    for(int i=1;i<=3;i++)
    {
      p=p->next;
   	  printf("%d\n",p->data);
    }  
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
int main() {
	int n;
	std::vector<int> vec;
	for (int i = 0; i < 10; i++) {
		std::cin >> n;
		vec.emplace_back(n);
	}
	std::sort(vec.begin(), vec.end());
	for (int i = 9; i > 6; i--) {
		std::cout << vec[i] << std::endl;
	}
}