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<iostream>
int main(void){
    int h;
    int t[3] = {0, 0, 0};
    for(int i = 0; i < 10; i++){
        std::cin >> h;
        for(int i = 0; i < 3; i++){
            if(t[i] <= h){
                switch(i){
                    case 0:
                        t[i+2] = t[i+1];
                        t[i+1] = t[i];
                        t[i] = h;
                        break;
                    case 1:
                        t[i+1] = t[i];
                        t[i] = h;
                        break;
                    case 2:
                        t[i] = h;
                }
                break;
            }
        }
    }
    for(int i = 0; i < 3; i++){
        std::cout << t[i] << std::endl;
    }
    return 0;
}

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

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

using namespace std;

int main(){
  int n = 10;
  vector<int> a;

  for(int i = 0; i < n; i++){
    int tmp;
    cin >> tmp;
    a.push_back(tmp);
  }

  sort(a.begin(), a.end(), greater<int>());

  cout << a[0] << endl;
  cout << a[1] << endl;
  cout << a[2] << endl;
  
  return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
 
using namespace std;
 
vector<int> heights;
int input;
 
int main(){
 while(cin >> input) heights.push_back(input);
 sort(heights.begin(), heights.end());
 auto itr = heights.end()-1;
 cout << *itr << "\n" << *(itr-1) << "\n" << *(itr-2) << endl;
 
 return 0;
}

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

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

 for(int i=0; i<3; i++){
  int n = h[0];
  int m = -1;
  for(int j=1; j<10; j++)
   if(n < h[j]){
    n = h[j];
    m = j;
   }
  cout << n << '\n';
  h[m] = -1;
 }

 return 0;
}

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

#define MAX_N 10000

int main() {
    vector<int> v;

    int num;
    while (cin >> num) {
        v.push_back(num);
    }

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

    int n = 3;
    for (int i = v.size() - 1 ; i >  v.size() - (n + 1) ; i--) {
        cout << v[i] << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
typedef pair<ll, P> P3;
typedef pair<P, P> PP;
constexpr ll MOD = ll(1e9 + 7);
constexpr int IINF = INT_MAX;
constexpr ll LLINF = LLONG_MAX;
constexpr int MAX_N = int(1e5) + 5;
constexpr double EPS = 1e-9;
constexpr int di[] = {0, 1, 0, -1}, dj[] = {1, 0, -1, 0};
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i > 0; i--)
#define SORT(v) sort((v).begin(), (v).end())
#define SORTR(v) sort((v).rbegin(), (v).rend())
#define ALL(v) (v).begin(), (v).end()

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

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

//using namespace--------------------------------------------------------------------------------------------------------------
using namespace std;

//define-----------------------------------------------------------------------------------------------------------------------
#define rep(i, n) for(int i = 0; i < (int)n; i++)
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define INF 1 << 25
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cerr << #x << " = " << (x) << "\n";
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)

//typedef----------------------------------------------------------------------------------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef unsigned int uint;
typedef unsigned long long ull;

//const------------------------------------------------------------------------------------------------------------------------
const double EPS = 1e-10;
const double PI = acos( -1.0 );

//global-----------------------------------------------------------------------------------------------------------------------
int a;
priority_queue<int> ar;
//function---------------------------------------------------------------------------------------------------------------------

int main() {
	rep( i, 10 ) {
		scanf( "%d", &a );
		ar.push( a );
	}
	rep( i, 3 ) {
		printf( "%d\n", ar.top() );
		ar.pop();
	}
	return 0;
}

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;
return 0;
}

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

int main(){

	int str[10];
	int max[3]={0};

	
	for(int j =0; j < 10; j++) {
		if( max[0] < str[j] ) {
			max[0] = str[j];
		}
	}
	for(int j =0; j < 10; j++) {
		if( max[1] < str[j] & str[j] != max[0]) {
			max[1] = str[j];
		}
	}
	for(int j =0; j < 10; j++) {
		if( max[2] < str[j] & str[j] != max[0] & str[j] != max[1]) {
			max[2] = str[j];
		}
	}
	
	printf("%d\n",max[0]);
	printf("%d\n",max[1]);
	printf("%d\n",max[2]);
	
}

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);
    for (int i = 9; i >= 7; i--) {
        cout << a[i] << endl;
    }

    return 0;
}

C++: #include<stdio.h>

int main() {
	int A[10];
	int S=0, M=0, L=0;
	int hold;
	for (int i = 0; i < 10; i++) {
		scanf("%d", &A[i]);
	}
	for (int j = 0; j < 10; j++) {
		if (L < A[j]) {
			L = A[j];
			hold = j;
		}
	}
	A[hold] = 0;
	for (int j = 0; j < 10; j++) {
		if (M < A[j]) {
			M = A[j];
			hold = j;
		}
	}
	A[hold] = 0;
	for (int j = 0; j < 10; j++) {
		if (S < A[j]) {
			S = A[j];
		}
	}
	printf("%d\n%d\n%d\n", L, M, S);


	return 0;
}