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(void){
    int hight[10], i, j, tmp;
     
    for(i = 0; i < 10; i++) 
        cin >> hight[i];
     
    for(i = 0; i < 10; i++){
        for(j = i + 1; j < 10; j++){
            if(hight[i] >= hight[j]){
                tmp = hight[i];
                hight[i] = hight[j];
                hight[j] = tmp;
            }
        }
    }
     
    for(i = 9; i > 6; i--){
        cout << hight[i] << endl;
    }
}

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>
using namespace std;

int main(){
	int i=0;
	int m[10];
	for(i=0;i<10;i++)
	{
		cin>>m[i];
		while(0>m[i]||m[i]>10000)
			cin>>m[i];

	}
	
  sort(m[0], m[9], greater<int>());
	
	cout<<m[0]<<endl<<m[1]<<endl<<m[2]<<endl;

    return 0;
}

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

int main()
{
    const int Size = 10;
    std::vector<int> List(Size);
    for(int i = 0; i < Size; ++i){
        std::cin >> List[i];
    }
    std::sort(List.begin(), List.end(), std::greater<int>());
    
    std::cout << List[0] << std::endl;
    std::cout << List[1] << std::endl;
    std::cout << List[2] << std::endl;

    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
    int mou[10];
    for(int i=0;i<10;i++)
        cin>>mou[i];
    for(int j=0;j<10;j++)
    {
        int temp=0;
        for(int i=0;i<9-j;i++)
    {
        if(mou[i]>mou[i+1])
            {int temp=mou[i];
            mou[i]=mou[i+1];
            mou[i+1]=temp;
            temp=1;}
    }
    if(temp=0)
        break;
    }
        cout<<mou[9]<<"\n"<<mou[8]<<"\n"<<mou[7]<<endl;
    return 0;
}

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

#define MAX 10

using namespace std;

int main() {

	int list[MAX];

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

	sort(list, list+MAX);
	for (int i = 0; i < 3; i++) {
		cout << list[MAX-i-1] << endl;
	}

	return 0;
}

C++: #include<cstdio>
#include<string.h>
#include<algorithm>
using namespace std;
long long int a[1000];
int main()
{
    //int i,j;

    for(int i=0;i<10;i++)
    {
        scanf("%lld",&a[i]);
    }
    sort(a,a+10);

    for(int j=9;j>=7;j--)
    printf("%lld\n",a[j]);
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int m1 = -1;
int m2 = -2;
int m3 = -3;
int m;

int main() {
    for (int i=0; i<10; i++) {
        cin >> m;
        if(m1 < m) {
            m3 = m2;
            m2 = m1;
            m1 = m;
        }
        else if(m2 < m) {
            m3 = m2;
            m2 = m;
        }
        else if(m3 < m) m3 = m;
    }
    cout << m1 << "\n" << m2 << "\n" << m3 << endl;

}

C++: #include<cstdio>

int main(){
  int data[10],order[10];

  //入力＆初期化
  for(int i=0;i<10;i++){
    scanf("%d",&data[i]);
    order[i]=1;
  }

  //順位付け
  for(int i=1;i<10;i++)
    for(int j=0;j<i;j++){
      if(data[j]<data[i]) order[j]++;
      if(data[j]>=data[i]) order[i]++;
    }

  //表示
  for(int i=1;i<=3;i++)
    for(int j=0;j<10;j++)
      if(order[j]==i)
	printf("%d\n",data[j]);
   
  return 0;
}

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

#define FOR(i,a,b) for(int i=(int)a;i<(int)b;++i)
#define REP(i,n) FOR(i,0,n)
 
int main()
{
  int n;
  std::vector<int> d;
  REP(i,10) {
      scanf("%d", &n);;
      d.push_back(n);
  }
  std::sort(d.begin(), d.end(), std::greater<int>() );
  printf("%d\n",d[0]);
  printf("%d\n",d[1]);
  printf("%d\n",d[2]);
   
  return 0;
}

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

int main(){
	int a[10]={0};
	int i,j,k=0;
	for( i=0; i<10; i++){
		cin >> a[i] ;

		if(0 > a[i]) i--;
		if(10000 < a[i]) i--;

	}

	for(i=0;i<10;i++){
  for(j=i+1;j<10;j++){
 if(a[i] < a[j]){
  k = a[j];
  a[j] = a[i] ;
  a[i] = k ;
 }
 }
 }
 for(i=0;i<3;i++){
  cout << a[i] <<"\n" ;
 }

    return 0;
}

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

int main()
{
  int first = 0, second = 0, third = 0;
  for (int i = 0; i < 10; i++) {
    int n;
    cin >> n;
    if (n > first) {
      third = second;
      second = first;
      first = n;
    } 
    else if(n > second) {
      third = second;
      second = n;
    }
    else if(n > third) {
      third = n;
    }
  }
  cout << first << "\n" << second << "\n" << third << endl;
  return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<algorithm>
using namespace std;
int main()
{
	int m[11],t;
	for(int i=1;i<=10;i++)
	{
		cin>>m[i];
	}
	for(int i=1;i<=10;i++)
	{
		for(int j=1;j<=10;j++)
		{
			if(m[i]<m[j])
			{
				t=m[i];
				m[i]=m[j];
				m[j]=t;
			}
		}
	}
	cout<<m[10]<<endl;
	cout<<m[9]<<endl;
	cout<<m[8]<<endl;
	return 0;
}

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

int main()
{
	const int N = 10;
	int A[N];
	const int M = 3;
	int top[M] = {0};

	for(int i = 0; i < N; i++)
		cin>>A[i];

	for(int i = 0; i < N; i++)
	{
		if(top[0] < A[i])
		{
			top[2] = top[1];
			top[1] = top[0];
			top[0] = A[i];
		}
		else if(top[1]<A[i])
		{
			top[2] = top[1];
			top[1] = A[i];
		}
		else if(top[2] < A[i])
			top[2] = A[i];
	}


	for(int i = 0; i < M; i++)
		cout <<top[i] << ' ';
	cout<<endl;

	return 0;
}

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

int main(){
  int t[10];
  for(int i=0;i<10;i++){
    cin>>t[i];
  }
  sort(t,t+10,greater<int>());
  cout<<t[0]<<endl;
  cout<<t[1]<<endl;
  cout<<t[2]<<endl;
}

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

int main(){
	int yama[10];
	
	int one,two;//??????????????¨
	for(int k=0; k<10; k++){
		for(int i=0; i<9; i++){
			if(yama[i] > yama[i+1]){
				one = yama[i];
				two = yama[i+1];
				yama[i] = two;
				yama[i+1] = one;
			}
		}
	}

	cout << yama[9] << endl;
	cout << yama[8] << endl;
	cout << yama[7] << endl;

	return 0;
}

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

C++: #include<iostream>
#include<string>
#include<string.h>
#include<algorithm>
#include<stdio.h>
#include<cmath>
#include<vector>
#include<utility>
#include<stack>
#include<queue>

#define FOR(i, a, b) for(int i=(a);i<=(b);i++)
#define RFOR(i, a, b) for(int i=(a);i>=(b);i--)
#define MOD 1000000007

using namespace std;

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