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()
{
	int t1 = 0;
	int t2 = 0;
	int t3 = 0;
	for (int i = 0; i < 10; i++)
	{
		int h;
		cin >> h;
		
		if (t1 < h)
		{
			t3 = t2;
			t2 = t1;
			t1 = h;
		}
		else if (t2 < h)
		{
			t3 = t2;
			t2 = h;
			//t1
		}
		else if (t3 < h)
		{
			t3 = h;
		}
	}
	
	cout << t1 << endl;
	cout << t2 << endl;
	cout << t3 << endl;
	
	return 0;
}

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

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

int main() {

	int r[3] = {0, 0, 0};
	int h;

	for(int i = 0; i < 10; i++){
		cin >> h;
		if(h > r[0]){
			r[2] = r[1];
			r[1] = r[0];
			r[0] = h;
		}else if(h > r[1]){
			r[2] = r[1];
			r[1] = h;
		}else if(h > r[2]){
			r[2] = h;
		}
	}

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

	return 0;
}

C++: #include <iostream>
using namespace std;
#include <cstdio>
#include <string.h>
#include <stdlib.h>
#include <math.h>
int main(void)
{
   int i,j,k,l;
   int a,b,c,d;
   int memory[2];
   int height[10];
   int n;

   for(i=0;i<10;i++) cin >> height[i];
   
   for(i=0;i<9;i++) {
      for(j=9;j>i;j--) {
         if(height[j] > height[j-1]) {
            int tmp = height[j];
            height[j] = height[j-1];
            height[j-1] = tmp;
         }
      }
   }

   for(i=0;i<3;i++) cout << height[i] << "\n";
   return 0;
}

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

using namespace std;

int a[10],n;

bool cmp(int a,int b){
	return a > b;
}

int main()
{	
	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++: mt = list()
for i in range(10):
    mt.append(int(raw_input()))

mt = sorted(mt,reverse=True)
for i in range(3):
    print mt[i]

C++: #include<iostream>

int main(){
int high[10];
int highest[3];
for(int i=0;i<10;i++){
cin>>high[i];}
highest[0]=high[0];
for(int i=1;i<10;i++){
if(high[i]>highest[0]){
highest[2]=highest[1];
highest[1]=highest[0];
highest[0]=high[i];}
if(highest[0]>=high[i]&&high[i]>highest[1]){
highest[2]=highest[1];
highest[1]=high[i];}
if(highest[1]>=high[i]&&high[i]>highest[2]){
highest[2]=high[i];}}
for(int i=0;i<3;i++){
cout<<highest[i]<<endl;}}

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

int main()
{
    vector<int> moun(10);
    vector<int>::iterator it=moun.begin();
    while(it!=moun.end())
    {
        cin>>*it;
        it++;
    }
    it=moun.begin();
    sort(moun.begin(),moun.end(),greater<int>());
    while(it!=moun.begin()+3)
    {
        cout<<*it<<endl;
        it++;
    }
}

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

int main(){
	int nyuryoku,high,low,middle,flag;
	
	for(int i=0;i<10;i++){
	cin>>nyuryoku;
	if(flag==0){
	high = nyuryoku;
	}else{
	if(nyuryoku>low){
		if(nyuryoku>middle){
			if(nyuryoku>high){
				high = nyuryoku;
			}else{
				middle = nyuryoku;
		}else{	
			low = nyuryoku;
		}
		}
	}
}
	cout<<highendl<<endl;
	cout<<middle<<endl;
	cout<<low<<endl;
return 0;
}

C++: #include <iostream>
#include <fstream>
#include <string> 
#include <cstring>
#include <cmath>  
#include <cstdlib>
#include <ctime>
#include <vector>
#include <algorithm>
#include <numeric>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <functional>
#include <cctype>
#include <list>
//#include <boost/multiprecision/cpp_int.hpp>

#define BIT(a) (1 << (a))
#define EPS (1e-10)

using namespace std;
//using namespace boost::multiprecision;

const long long MOD = 1000000007;
const int COUNTER_CLOCKWISE = 1;
const int CLOCKWISE = -1;
const int ONLINE_BACK = 2;
const int ONLINE_FRONT = -2;
const int ON_SEGMENT = 0;

class Point{
    public:
    double x, y;

    Point(double x = 0, double y = 0): x(x), y(y) {}
    
    Point operator+(Point p){return Point(x + p.x, y + p.y);}
    Point operator-(Point p){return Point(x - p.x, y - p.y);}
    Point operator*(double a){return Point(a * x, a * y);}
    Point operator/(double a){return Point(x / a, y / a);}

    bool operator < (const Point &p) const {
        return y != p.y ? y < p.y : x < p.x;
    }

    double norm(){return x * x + y * y;}
};
typedef Point Vector;
typedef vector<Vector> Polygon;

double cross(Vector a, Vector b){
    return a.x*b.y - a.y*b.x;
}

double dot(Vector a, Vector b){
    return a.x * b.x + a.y * b.y;
}

int ccw(Point p0, Point p1, Point p2){
    Vector a = p1 - p0;
    Vector b = p2 - p0;
    if (cross(a, b) > EPS)return COUNTER_CLOCKWISE;
    if (cross(a, b) > -EPS)return CLOCKWISE;
    if (dot(a, b) < -EPS)return ONLINE_BACK;
    if (a.norm() < b.norm())return ONLINE_FRONT;

    return ON_SEGMENT;
}

Polygon andrewScan(Polygon s){
    Polygon u, l;
    if (s.size() < 3) return s;
    sort(s.begin(), s.end());
    u.push_back(s[0]);
    u.push_back(s[1]);
    l.push_back(s[s.size()-1]);
    l.push_back(s[s.size()-2]);
    
    for (size_t i = 2; i < s.size(); i++){
        for (size_t n = u.size(); n >= 2 && ccw(u[n-2], u[n-1], s[i]) == COUNTER_CLOCKWISE; n--){
            u.pop_back();
        }
        u.push_back(s[i]);
    }

    for (int i = (int)s.size() - 3; i >= 0; i--){
        for (size_t n = l.size(); n >= 2 && ccw(l[n-2], l[n-1], s[i]) == COUNTER_CLOCKWISE; n--){
            l.pop_back();
        }
        l.push_back(s[i]);
    }

    reverse(l.begin(), l.end());
    for (size_t i = u.size() - 2; i >= 1; i--) l.push_back(u[i]);

    return l;
}

long long mod_pow(long long x, long long n){
    long long res = 1;
    for(int i = 0;i < 60; i++){
        if(n >> i & 1) res = res * x % MOD;
        x = x * x % MOD;
    }
    return res;
}


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

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

int main () {
	int takasa[10];

	for(int i = 0; i < 10; i++){
		cin >> takasa[i];
	}
	
	//sort
	/*for(int i = 0; i < 9; i++){
		for(int j = i + 1; j < 10; j++){
			if(takasa[i] < takasa[j]){
				swap(takasa[i],takasa[j]);
			}
		}
	}*/

	sort(&takasa[0],&takasa[10]);

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

	return 0;
}

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

C++: #include <cstdio>
#include <algorithm>
using std::__gcd;
using std::sort;
int main(){
	int in[10];
	for(int i=0;i<10;++i)
		scanf("%d",&in[i]);
	sort(in,in+10);
	for(int i=9;i>=7;--i)
		printf("%d\n",in[i]);
		
	return 0;	
}