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>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
int n;
using namespace std;
int main(){
	priority_queue <int > dp;

	while(cin>>n){
		dp.push(n);
	}
	for(int i=0;i<3;i++){
		int output=dp.top();
		dp.pop();
		cout<<output;
	}
	return 0;
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <cassert>
using namespace std;
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define EXIST2(s,e) (find(ALL(s),(e))!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define EACH(t,i,c) for(t::iterator i=(c).begin(); i!=(c).end(); ++i)
const double EPS = 1e-10;
const double PI  = acos(-1.0);


int main(){
	vi a(10);
	REP(i,10){
		cin>>a[i];
	}
	sort(RALL(a));
	cout<<a[0]<<endl;
	cout<<a[1]<<endl;
	cout<<a[2]<<endl;
}

C++: #include<stdio.h>
#include<iostream>
using namespace std;
int main(){
	int a[10];
	int b=0;
	for(int i=0;i<10;i++){
		cin >> a[i];
	}
	int mou1,mou2,mou3;
	mou1=a[0];
	for(int i=0;i<10;i++){
		
		if(mou1<a[i]){
			mou1=a[i];
			b=i;
		}
	}
	a[b]=0;
	mou2=a[0];
	for(int i=0;i<10;i++){
		
		if(mou2<a[i]){
			mou2=a[i];
			b=i;
				
		}
	}a[b]=0;
	mou3=a[0];
	for(int i=0;i<10;i++){
		
		if(mou3<a[i]){
			mou3=a[i];
			b=i;
				
		}
	}
	cout<<mou1<<"\n"<<mou2<<"\n"<<mou3<<"\n";

	return 0;

}

C++: 
#include<bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int main(){
  int h[10];
  rep(i,10){
    cin >> h[i];
  }
  sort(h,h+10);
  reverse(h,h+10);
  rep(i,3){
    cout << h[i] << endl;
  }
  return 0;
}

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

int main(){

	int hill[]={0,0,0,0,0,0,0,0,0,0};

	for(int j=0;j<=9;j++){
		scanf("%d",&hill[j]);
	}

	int key;

	//sort
	for(key=9;key>=0;key--){

		for(int i=0;i<=key;i++){
			if(hill[i]>hill[i+1]){
				swap(hill[i],hill[i+1]);
			}
		}

	}

	printf("%d%d%d",hill[9],hill[8],hill[7]);

	return 0;

}

C++: a = Array.new
10.times do
	n = gets.to_i
	a.push n
end
a.sort!
puts "#{a[9]} #{a[8]} #{a[7]}"

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

int main(void) {
  int a[10], i;
  for(i = 0; i < 10; ++i)scanf("%d", &a[i]);
  std::sort(a, a + 10);
  for(i = 9; i >6; --i) printf("%d\n", a[i]);
  return 0;
}

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

#define for_(i,a,b) for(int i=(a);i<(b);++i)

int main() {
	int h[10] = {0};
	for_(i,0,10) cin >> h[i];
	sort(h, h + 10, greater< int >());
	for_(i,0,3) cout << h[i] << endl;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <climits>
#define LL long long
const double pi=acos(-1.0);
using namespace std;
const int maxm = 20;
const double eps = 1e-6;
int cmp(const void *a,const void *b)
{
    return *(int*)b-*(int*)a;
}
int main()
{
    int a[10];
   for(int i=0;i<10;i++)
    scanf("%d",&a[i]);
   qsort(a,10,sizeof(int),cmp);
   printf("%d\n%d\n%d\n",a[0],a[1],a[2]);
   return 0;
}

C++: #include<stdio.h>
int main(void){
    int d,m1=0,m2=0,m3=0,i;
    for(i=0;i<10;i++){
        scanf("%d",&d);
        if(d>m1){
            m3=m2;
            m2=m1;
            m1=d;
        }else if(d>m2){
            m3=m2;
            m2=d;
        }else if(d>m3){
            m3=d;
        }
    }
    printf("%d\n",m1);
    printf("%d\n",m2);
    printf("%d\n",m3);
    return 0;
}

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

int main() {
    vector<int> v;
    for(int i = 0; i < 10; i++) {
        int x;
        cin >> x;
        v.push_back(x);
    }
    sort(v.begin(), v.end());
    string str;
    for(int i = 9; i >6; i--) {
        str += to_string(v[i]);
        str += "\n";
    }
    str.pop_back();
    cout << str << endl;
}

C++: #include <bits/stdc++.h>
using namespace std;
int a[10];
int main() {
	for(int i = 0; i < 10; i++) scanf("%d", &a[i]);
	sort(a, a + 10, greater<int>());
	for(int i = 0; i < 3; i++) printf("%d\n", a[i]);
	return 0;
}

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

void swap(int &x, int &y) {
	int a;
	a = x;
	x = y;
	y = a;
}

int main() {
	int a[10],max,mid,min;
	for (int i=0; i<10; i++) {
		cin >> a[i];
	}
	max = a[0];
	mid = a[1];
	min = a[2];
	if (mid > max) {
		swap(max,mid);
	}
	if (min > max) {
		swap(min,max);	
	}
	if (min > mid) {
		swap(min, mid);
	}
	for (int j=3; j<10; j++) {
		if (a[j] > max) {
			min = mid;
			mid = max;
			max = a[j];
		}else if (a[j] > mid) {
			min = mid;
			mid = a[j];
		}else if (a[j] > min) {
			min = a[j];
		}
	}
	cout << max << endl << mid << endl << min << endl;
}

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

using namespace std;

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

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int arr[15];
    for(int i=0;i<10;i++)
    {
        scanf("%d",&arr[i]);
    }
    sort(arr,arr+10);
    printf("%d\n%d\n%d\n",arr[9],arr[8],arr[7]);
    return 0;
}

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

int main() {
    return []() {
        std::function<void()> input;
        std::vector <int> list;
        (input = [&input, &list]() {
            int data;
            if ( std::cin >> data ) {
                list.push_back( data );
                input();
            } else {
                sort( list.rbegin(), list.rend() );
                for_each(
                    list.begin(),
                    list.begin() + 3,
                    [](int x){ std::cout << x << std::endl; }
                );
            }
        })();
        return 0;
    }();
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
using namespace std;int main(){int n,i;vector<int> h;for(i=0;i<10;++i)cin>>n,h.push_back(n);sort(h.begin(),h.end());for(i=9;i>6;i--)cout<<h[i]<<endl;}