Go: package main

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

func getsAsIntArray() (line []int) {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		str := scanner.Text()
		if str == "" {
			break
		}
		data, err := strconv.Atoi(str)
		if err != nil {
			break
		}
		line = append(line, data)
	}

	return
}

func main() {

	lines := getsAsIntArray()
	sort.Sort(sort.Reverse(sort.IntSlice(lines)))
	for i, v := range lines {
		if i < 3 {
			fmt.Println(v)
		}
	}
}

C++: #include <cstdio>
#include <algorithm>
#include <functional>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)

int main() {
	int ary[10];
	rep(i,10) {
		scanf(" %d", &ary[i]);
	}
	sort(ary, ary + 10, greater<int>());
	rep(i,3) {
		printf("%d\n", ary[i]);
	}
	return 0;
}

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

using namespace std;

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

    return 0;
}

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

using namespace std;

int cmp(int* a, int* b)
{
	return (*a < *b) ? 1 : ((*a > *b) ? -1 : 0);
}

int main()
{
	int dat[10];

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

	qsort(dat, 10, sizeof(int), reinterpret_cast<int(*) (const void*, const void*)>(cmp));

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

	return 0;
}

C++: #include <iostream>
#include <string>
#include <cstring>
#include <fstream>
#include <random>
#include <cmath>
#include <iomanip>
#include <climits>
#include <cstdlib>
#include <algorithm>
#include <vector>
#include <map>
#include <deque>
#include <map>
#include <set>
#include <unordered_set>
#include <queue>
#include <stack>
#include <list>
#include <unordered_map>
#include <bitset>
#include <sstream>
#include <new>
#include <typeinfo>
#include <iterator>


typedef long long ll;
typedef unsigned long long ull;
constexpr ll mop = 1000000007;
constexpr ll mop2 = 998244353;

using namespace std;

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

C++: #include <iostream>

int main() {
	int mt[10], limit = 10000;
	for ( int i = 0; i < 10; i++ ) {
		std::cin >> mt[ i ];
	}

	for ( int j = 0; j < 3; j++ ) {
		int max = 0;
		for ( int i = 0; i < 10; i++ ) {
			if ( max < mt[ i ] && mt[ i ] < limit ) {
				max = mt[ i ];
			}
		}
		std::cout << max << std::endl;
		limit = max;
	}
}

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

int main()
{
 int i;
 vector<int> a;
 int c;
 for(i=0;i<10;i++)
 {
  cin>>c;
  a.push_back(c);
 }

  sort(a.begin(),a.end());

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

  return(0);
}

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

using namespace std;

int data;
int mountain[10];
int i=0;

int main(){
	scanf("%d",&data);

	while((data != EOF) && (i < 10)){
		mountain[i] = data;
		i++;
		scanf("%d",&data);
	}

	sort(mountain, mountain + 10);

	for(int j=0;j<3;j++){
		printf("%d\n",mountain[j]);
	}

    return 0;
}

C++: #include <iostream>
#include <vector>
#include <utility>
#include <string>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <string.h>
#include <deque>
#define REP(i,j,n) for(int i=j;i<n;i++)
#define SORT(x) sort(x.begin(),x.end())

using namespace std;



int main() {
	vector<int> v(10000);
	for (int i = 0; i < v.size(); i++) {
		cin >> v[i];
	}

	sort(v.begin(), v.end());

	cout << v[9999] << endl << v[9998] << endl << v[9997] << endl;
	
	return 0;
}

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

using namespace std;

int main(){
    int i;
    int h[10];

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

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

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

}

C++: #include<stdio.h>
int main()
{
    long long int a[10],i,x,y,z;
    for(i=0;i<10;i++)
    {
        scanf("%lld",&a[i]);
    }
    x=a[0];
    for(i=0;i<10;i++)
    {
       if(a[i]>x)
       {
           x=a[i];
       }
    }
    y=0;
     for(i=0;i<10;i++)
    {
       if(a[i]!=x&&a[i]>y)
       {
           y=a[i];
       }
    }
    z=0;
     for(i=0;i<10;i++)
    {
       if(a[i]!=x&&a[i]!=y&&a[i]>z)
       {
           z=a[i];
       }
    }
    printf("\n%lld\n%lld\n%lld\n",x,y,z);


    return 0;
}

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

typedef long long ll;

int main(void)
{
    struct mount {
        ll h1st; ll h2nd; ll h3rd;
    } m;

    m.h1st = 0; m.h2nd = 0; m.h3rd = 0;

    ll mheight;
    for (int i = 0; i < 10; i++) {
        cin >> mheight;
        if (mheight > m.h1st) {
            m.h3rd = m.h2nd;
            m.h2nd = m.h1st;
            m.h1st = mheight;
        } else if (mheight > m.h2nd) {
            m.h3rd = m.h2nd;
            m.h2nd = mheight;
        } else if (mheight > m.h3rd) {
            m.h3rd = mheight;
        }
    }

    cout << m.h1st << endl;
    cout << m.h2nd << endl;
    cout << m.h3rd << endl;

    return 0;
}

C++: #include <iostream>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <deque>
#include <algorithm>
#include <iomanip>
#include <functional>

#define REP(i, n) for(int i = 0;i < (n); i++)
#define REP2(i, x, n) for(int i = (x); i < (n); i++)
#define REPR(i, n) for(int i = (n); i >= 0; i--)

#define ALL(a) (a).begin(),(a).end()
#define SORT(c) sort((c).begin(),(c).end())
#define DESCSORT(c) sort(c.begin(), c.end(), greater<int>())

#define LL long long int
#define LD long double

#define PI 3.14159265358979

using namespace std;

//================================================
int main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	
	vector<int>ans(10);
	int N;

	REP(i, 10) cin >> ans[i];
	DESCSORT(ans);
	REP(i, 3) cout << ans[i] << "\n";
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <cassert>
using namespace std;

#define GET_ARG(a,b,c,F,...) F
#define REP3(i,s,e) for (i = s; i <= e; i++)
#define REP2(i,n) REP3 (i,0,(int)(n)-1)
#define REP(...) GET_ARG (__VA_ARGS__,REP3,REP2) (__VA_ARGS__)
#define RREP3(i,s,e) for (i = s; i >= e; i--)
#define RREP2(i,n) RREP3 (i,(int)(n)-1,0)
#define RREP(...) GET_ARG (__VA_ARGS__,RREP3,RREP2) (__VA_ARGS__)
#define DEBUG(x) cerr << #x ": " << x << endl

typedef long long ll;

constexpr int INF = 1e8;
constexpr int MOD = 1e9+7;

int main(void) {
    int i;
    int a[10];
    REP (i,10) cin >> a[i];
    sort(a,a+10,greater<int>{});
    REP (i,3) cout << a[i] << endl;
    return 0;
}

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

C++: #include<stdio.h>
#include<algorithm>
using namespace std;

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

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

int main() {
	
	int a=0,b=0,c=0,i,n;
	
	for( i=0 ; i<10 ;i++){
		
		cin>>n;
		
		if(a<n){
			c=b;
			b=a;
			a=n;
		}else if(b<n && n<a){
			c=b;
			b=n;
		}else if(c<n && n<b){
			c=n;
		}
	}
	
	cout<<a<<" "<<b<<" "<<c<<endl;
	
	return 0;
}

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

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