Go: package main

import "fmt"

func main() {
	var height int
	topHeights := [5]int{}

	for i := 0; i < 10; i++ {
		fmt.Scan(&height)

		for j := 0; j < 3; j++ {
			if topHeights[j] < height {
				topHeights[j+2] = topHeights[j+1]
				topHeights[j+1] = topHeights[j]
				topHeights[j] = height
				break
			}
		}
	}

	for i := 0; i < 3; i++ {
		fmt.Println(topHeights[i])
	}
}

C++: #include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define vec_input(v) for(auto it=v.begin();it!=v.end();it++){cin>>*it;}
#define vec_output(v) for(auto it=v.begin();it!=v.end();it++){if(it!=v.begin())cout<<" ";cout<<*it;}cout<<endl;
#define vec_debug(v) for(auto it=v.begin();it!=v.end();it++){cerr<<*it<<" ";}cerr<<endl;
#define yn(ans) cout<<(ans?"Yes":"No")<<endl
#define YN(ans) cout<<(ans?"YES":"NO")<<endl
using namespace std;
using ll = long long;
template <typename T>T digitsum(T n);
template <typename T>bool isPrime(T n);
template <typename T>vector<pair<T, T>> prime_factor(T n);
long long int intpow(long long int,long long int);
template <typename T>T intlog(T);
long long int combination(long long int,long long int);
long long int series_sum(long long int);

int main(){
    vector<int> vec(10);
    vec_input(vec);
    sort(rall(vec));
    rep(i,3){
        cout<<vec[i]<<endl;
    }
}

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<iostream>
#include<algorithm>
using namespace std;
int main(){
int a[10];
for(int i=0;i<10;i++)cin>>a[i];
sort(a,a+10);
cout<<a[0]<<endl;
cout<<a[1]<<endl;
cout<<a[2]<<endl;
return 0;
}

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

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

using namespace std;

int main(){
   int n[10];
   
   for(int i = 0; i < 10; i++) cin >> n[i];
   sort(n, n+9);
   for(int i = 0; i< 3; i++) cout << n[i]<< endl;
   return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
  vector<int> v;
  for (int i = 0; i < 10; i++) {
    int a;
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end(), greater<int>());
  for (int i = 0; i < 3; i++)
    cout << v.at(i) << endl;
}

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

int main(){
    int height;
    vector<int> heights;
    while (cin >> height)
	heights.push_back(height);
    sort(heights.begin(), heights.end(), greater<int>());
    for (int i = 0; i < 3; i++)
	cout << heights[i] << endl;
}

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

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

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

C++: #include <stdio.h>
main(){
  int h[10];
  int st,nd,rd;
  st = 0;
  nd = 0;
  rd = 0;
  for(i=0;i<10;i++){
    scanf("%d",&h[i]);
    if(h[i]>st){
      st = h[i];
    }else if(h[i]>nd){
      nd = h[i];
    }else if(h[i]>rd){
      rd = h[i];
    }
  }
  printf("%d\n%d\n%d\n",st,nd,rd);
}

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

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

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

using namespace std;

int main()
{
	vector<int> arr(10);
	
	for(int i = 0; i < 10; i++){
		cin >> arr[i];
	}
	
	sort(arr.begin(),arr.end());
	
	printf("%d\n%d\n%d\n",arr[9],arr[8],arr[7]);
	
	return 0;
}

C++: #include <iostream>

using namespace std;

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

	for(int i=0;i<10;i++)
		cin >> val[i];

	for(int i=0;i<9;i++)
		for(int j=0;j<9;j++)
			if(val[j]<val[j+1]){
				int tmp=val[j];
				val[j]=val[j+1];
				val[j+1]=tmp;
			}

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

	return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
	const int N=10;
	int height[N];
	for(int i=0;i<10;i++){
		scanf("%d",height[i]);
	}
	sort(height,height+N);
	reverse(height,height+N);
	for(int j=0;j<3;j++){
		printf("%d",height[j]);
	}
	return 0;
}

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

int main() {

  typedef std::multiset<int> MySet;
  MySet heightSet;

  for(int i = 0; i < 10; ++i)
  {
    int val;
    cin >> val;
    // set ???????´?????????\????????¨??????????????????????????????
    heightSet.insert(val);
  }

  // ??§??????????????¢???????????????????????? reverse_iterator ?????????
  MySet::reverse_iterator rit = heightSet.rbegin();
  for(int i = 0; i < 3; ++i)
  {
    cout << *rit << endl;
    ++rit;
  }
  return 0;
}

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
// #define main int main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  while (true) {}
}

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

C++: #include<stdio.h>
int main() {
	int a=0, b=0, c=0, i;
	while (scanf("%d", &i) == 1) {
		if (a < i) {
			if (a != 0) {	
				if (0 != b)
					c = b;
				b = a;
			}
			a = i;
		}
		else if (b < i) {
			if (b != 0) 
				c = b;
			b = i;
		}
		else if (c < i)
			c = i;
	}
	printf("%d\n%d\n%d\n", a, b, c);
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main()
{
    int m[10];

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

    sort(m, m + 10, greater<int>());

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