Go: package main

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

func main() {
        fp := os.Stdin
        scanner := bufio.NewScanner(fp)
        var lst [3]int

        for scanner.Scan() {
                num, _ := strconv.Atoi(scanner.Text())
                if lst[0] < num {
                        lst[2] = lst[1]
                        lst[1] = lst[0]
                        lst[0] = num
                } else if lst[1] < num {
                        lst[2] = lst[1]
                        lst[1] = num
                } else if lst[2] < num {
                        lst[2] = num
                }
        }

        for _, i := range lst {
                fmt.Printf("%d\n", i)
        }
}

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

C++: #include <iostream>

using namespace std;

int main(void)
{
	int input[10];

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


	for(int i = 3; i < 10; i++){
		for(int j = 0; j < 3; j++){
			if(input[i] > input[j]){
				input[j] = input[i];
				break;
			}
		}
	}

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


	return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
	int a=0;
	std::vector<int> vec(10);
	for(int i=0;i<10;i++){
		std::cin>>vec[i];
	}
	/*for(int d=0;d<3;d++){
		for(int i=0;i<10;i++){
			if(vec[i]>a)a=vec[i];
		}
		std::cout<<a<<std::endl;
		for(int i=0;i<10;i++){
			if(vec[i]==a)vec[i]=0;
		}
		a=0;
	}*/
	for(int i=0;i<9;i++){
		if(vec[i]<vec[i+1]){
			a=vec[i];
			vec[i]=vec[i+1];
			vec[i+1]=a;
			a=0;
		}
	}
	std::cout<<vec[0]<<std::endl<<vec[1]<<std::endl<<vec[2]<<std::endl;
	return 0;

C++: import java.util.*;

class Main{
    public static void main(String[] a){

        int[] h = new int[10]; //10??¶????????±?????\??????????????????????????£?¨?

        Scanner s = new Scanner(System.in);
        for(int i = 0; i < h.length; i++){
            h[i] = s.nextInt();
        }

        Arrays.sort(h);

        for(int i = 9; i >= 7; i--){
            System.out.println(h[i]);
        }

    }
}

C++: #include <iostream>
using namespace std;
 
int main()
{
    int A[10],h1,h2,h3,i,pos1,pos2;
    for(i=0;i<10;i++)
    cin>>A[i];
    h1=A[0];
    pos1=0;
    for(i=1;i<10;i++)
    {
        if(A[i]>h1)
        {
            h1=A[i];
            pos1=i;
        }
    }
    A[pos1]=-1;
    h2=A[1];
    pos2=1;
    for(i=2;i<10;i++)
    {
        if(A[i]>h2)
        {
            h2=A[i];
            pos2=i;
        }
    }
    A[pos2]=-1;
    h3=A[2];
    for(i=3;i<10;i++)
    {
        if(A[i]>h3)
            h3=A[i];
    }
    cout<<h1<<"\n"<<h2<<"\n"<<h3;
}

C++: #include<stdio.h>
#include<algorithm>
using std::sort;
main(){
    int x[10],i;
    for(i=0;i<10;i++)
    scanf("%d",&x[i]);
    sort(x,x+10);
    printf("%d\n%d\n%d",x[9],x[8],x[7]);
    scanf(" ");
}

C++: #include<cstdio>
#include<algorithm>
using namespace std;
int main()
{
	int a[10];
	for(int i=0;i<=9;++i)scanf("%d",&a[i]);
	sort(a,a+10);
	printf("%d\n%d\n%d",a[9],a[8],a[7]);
	return 0;
}

C++: #include <iostream>
#include <string>
#include <string.h>
#include <math.h>
#include <time.h>
#include <stdio.h>
#include <ctype.h>
#include <utility>
#include <algorithm>
#include <set>
#include <queue>
#include <stack>
#include <vector>
#include <map>
#include <list>
#include <sstream>
#include <iomanip>

using namespace std;

#define FORST(X,S,T) for(int X=(S); X<=(T); X++)  
#define RFORST(X,S,T) for(int X=(S); X>=(T); X--)  
#define FOR(X,XB) for(int X=0; X<(XB); X++)
#define RFOR(X,XB) for(int X=(XB)-1; X>=0; X--)
#define FORSTL(X,C) for(X=C.begin();X!=C.end();X++)
#define RFORSTL(X,C) for(X=C.rbegin();X!=C.rend();X++)
#define SQR(X) ((X)*(X))
#define MID(X,Y) (((X)+(Y))/2)
#define MIN(X,Y) (X=min((X),(Y)))
#define MAX(X,Y) (X=max((X),(Y)))
#define FILL(X,V) memset(X,V,sizeof(X))
#define FILE_R(X) freopen(X, "r", stdin)
#define FILE_W(X) freopen(X, "w", stdout)  
#define ERREQ(X,Y) (fabs((X)-(Y))<EPS)
#define DBGL cout << "here" << endl;
#define INITLISTS {L=0; FILL(adj,-1);}
#define SZ(X) (int)sizeof(X)
const double PI = acos(-1.0);
const double EPS = 1E-9;
const int INF = (int)1E9;
typedef long long LL;
typedef vector<int> VI;
typedef unsigned int uint;

#define MAXN 100005

int main(){
	int a[15];
	FOR(i,10) cin>>a[i];
	sort(a, a+10);
	FOR(i,3) cout << a[9-i] << endl;
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
  int height[10] = {0};
  for(int i=0; i<10; i++){
    cin >>height[i];
  }
  sort(height,height+10);
  cout <<height[9]<<endl<<height[8]<<endl<<height[7]<<endl;
  return 0;
}

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

int main() {
  int n, h[3] = {};

  for(int i = 0; i < 10; i++) {
    cin >> n;
    for(int j = 0; j < 3; j++) {
      if(n > h[j]) swap(n, h[j]);
    }
  }

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

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

int main(){
  int a[10];
  int tmp;
  int n = 0;

  while(n<10){
    cin >> a[n];
    n++;
  }

  int i,j;

  //降順ソート
  for(i = 0;i < 10;i++){
    for(j = i+1;j < 10;j++){
      if(a[i] < a[j]){
	tmp = a[i];
	a[i] = a[j];
	a[j] = tmp;
      }
    }
  }

  //結果の表示
  for(i = 0;i < 3;i++){
    cout << a[i] << endl;
  }
    return 0;
}

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

int main()
{
	int i, h;
	int mh[3] = {0};

	for(i=0;i<10;i++){
		cin>>h;
		if(mh[0] < h) mh[0] = h;
		else if(mh[1] < h) mh[1] = h;
		else if(mh[2] < h) mh[2] = h;

	}
	for(i=0;i<3;i++)	cout<<mh[i]<<endl;

	

	return 0;
}

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

int main(){
    priority_queue<int> que;

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

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

    return 0;
}

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

int main(){
	int yama;
	int a = 0;
	int b = 0;
	int c = 0;

	for (int i = 0; i < 10; i++){
		cin >> yama;
		if (a < yama){
			c = b;
			b = a;
			a = yama;
		}
		else if (b < yama || a == yama){
			c = b;
			b = yama;
		}
		else if (c < yama || b == yama){
			c = yama;
		}
	}
	cout << a << endl << b << endl << c << endl;

	return 0;
}

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

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int m[3];
    cin>>m[0]>>m[1]>>m[2];
    if(m[0]<m[1]) swap(m[0], m[1]);
    if(m[1]<m[2]) swap(m[1], m[2]);
    if(m[0]<m[1]) swap(m[0], m[1]);
    for(int i=3; i<10; i++){
        int t;
        cin>>t;
        if(t>m[2]){
            int p=2;
            while(p>0&&t>m[p-1]){
                m[p]=m[p-1];
                --p;
            }
            m[p]=t;
        }
    }
    for(int i=0; i<3; i++){
        cout<<m[i]<<'\n';
    }
    return 0;
}

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

using namespace std;

int main() {
    array<int,10> ar;
    for(int i=0;i<10;i++){
        int height;
        cin >> height;
        ar[i]=height;
        }
    sort(ar.begin(),ar.end());
    for(int j=0;j<3;j++){
        cout << ar[9-j] << endl;
        
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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