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<stdio.h>
int main(void) {
	int i, mountain[10],x,y;
	int n = 0;
	int l = 0;
	int m = 0;
	for (i = 0;i < 10;i++) {
		scanf("%d", &mountain[i]);
	}
	for (i = 0;i < 10;i++) {
		if (mountain[i] > m) m = mountain[i];
		x = i;
	}
	printf("%d\n", m);
	for (i = 0;i < 10;i++) {
		if (i == x) {}
		else {
			if (mountain[i] > n) {
				n = mountain[i]; 
			}
			y = i;
		}
	}
	printf("%d\n", n);
	for (i = 0;i < 10; i++) {
		if (i == y || i == x) {}
		else {
			if (mountain[i] > l) {
				l = mountain[i];
			}
		}
	}
	printf("%d\n", l);

	return 0;
}

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

int main(){
int a[10];

for(int i=0;i<10;i++){
scanf(" %d",&a[i]);
}

sort(a,a+10);

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

return 0;
}

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

using namespace std;

int main() {
	int m[10];

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

	stable_sort(m, m + 10);

	for (int i = 9; i > 6; i--)cout << m[i] << endl;

	return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <ctime>
#include <cassert>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
#include <numeric>
#include <list>
#include <iomanip>


using namespace std;

#ifdef _MSC_VER
#define __typeof__ decltype
template <class T> int popcount(T n) { return n ? 1 + popcount(n & (n - 1)) : 0; }
#endif
#ifdef __GNUC__
template <class T> int popcount(T n);
template <> int popcount(unsigned int n) { return n ? __builtin_popcount(n) : 0; }
template <> int popcount(int n) { return n ? __builtin_popcount(n) : 0; }
template <> int popcount(unsigned long long n) { return n ? __builtin_popcountll(n) : 0; }
template <> int popcount(long long n) { return n ? __builtin_popcountll(n) : 0; }
#endif

#define foreach(it, c) for (__typeof__((c).begin()) it=(c).begin(); it != (c).end(); ++it)
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define CL(arr, val) memset(arr, val, sizeof(arr))

#define rep(i, n) for (int i = 0; i < n; ++i)

template <class T> void max_swap(T& a, const T& b) { a = max(a, b); }
template <class T> void min_swap(T& a, const T& b) { a = min(a, b); }

typedef long long ll;
typedef pair<int, int> pint;

const double EPS = 1e-8;
const double PI = acos(-1.0);
const int dx[] = { 0, 1, 0, -1 };
const int dy[] = { 1, 0, -1, 0 };
bool valid_pos(int x, int y, int w, int h) { return 0 <= x && x < w && 0 <= y && y < h; }

template <class T> void print(T a, int n, int br = 1, const string& deli = ", ") { cout << "{ "; for (int i = 0; i < n; ++i) { cout << a[i]; if (i + 1 != n) cout << deli; } cout << " }"; while (br--) cout << endl; }
template <class T> void print(const vector<T>& v, int br = 1, const string& deli = ", ") { print(v, v.size(), br, deli); }


int main()
{
	int a[10];
	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]);
}

C++: #include <iostream>
using namespace std;
 
int main()
{
     int a, b;
     cin >> a >> b;
     cout << a*b << " " << 2*(a+b) << endl;
}

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

void swap(int* x, int* y) {
	int tmp;
	tmp = *x;
	*x = *y;
	*y = tmp;
}

void isort(int b[]) {
	int c[10],max = 0, k = 0;
	for (int i = 0; i < 10; i++) {
		max = b[i];
		for (int j = i; j < 10; j++) {
			if (max < b[j]) {
				swap(&max, &b[j]);
			}
		}
		c[i] = max;
	}
	k = 0;
	while (k < 3) {
		cout << c[k] << endl;
		k++;
	}
}

int main()
{
	int a[10], i = 0;
	while (i < 10) {
		cin >> a[i];
		i++;
	}
	isort(a);
	
    return 0;
}

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

int main(){

	int height[10];

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

	}

		for (int j=0;j<10;j++){
			for (int k=0;k<10;k++){
				if (height[j]<height[k]){
					int tmp;
					tmp=height[j];
					height[j]=height[k];
					height[k]=tmp;
				}
			}
		}

		for(int m=9;m>6;m--){
			cout<<height[m]<<endl;
		}



    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();
            }
        })();
        sort( list.rbegin(), list.rend() );
        for_each(
            list.begin(),
            list.begin() + 3,
            [](int x){ std::cout << x << std::endl; }
        );
        return 0;
    }();
}

C++: #include <iostream>

using namespace std;

int main(int argc, char** argv)
{
        int height;
        int first = 0, second = 0, third = 0;
        for (int i = 0; i < 10; i++) {
                cin >> height;
                if (height > first) {
                        third = second;
                        second = first;
                        first = height;
                } else if (height > second) {
                        third = second;
                        second = height;
                } else if (height > third) {
                        third = height;
                }
        }
        cout << first << endl;
        cout << second << endl;
        cout << third << endl;

        return 0;
}

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

int main(){
	const int N=10;
	int date[N];
	int tmp;

	for(int i=0;i<N;i++) cin>>data[i];
	for(int i=1;i<=3;i++){
		for(int j=0;j<N-i;j++){
			if(data[j]>data[j+1]){
				tmp=data[j];
				data[j]=data[j+1];
				data[j+1]=tmp;
			}
		}
	}
	cout<<data[N-1]<<endl<<data[N-2]<<endl<<data[N-3]<<endl;

	return 0;
}

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

ostream &operator<<(ostream &os, __int128_t value) {
  if (ostream::sentry(os)) {
    __uint128_t tmp = value < 0 ? -value : value;
    char buffer[64];
    char *d = end(buffer);
    do {
      --d;
      *d = "0123456789"[tmp % 10];
      tmp /= 10;
    } while (tmp != 0);
    if (value < 0) {
      --d;
      *d = '-';
    }
    int len = end(buffer) - d;
    if (os.rdbuf()->sputn(d, len) != len) {
      os.setstate(ios_base::badbit);
    }
  }
  return os;
}
 
istream &operator>>(istream &is, __int128_t &value) {
  string in;
  is >> in;
  value = 0;
  for (const char &c : in) {
    if ('0' <= c && c <= '9') value = 10 * value + (c - '0');
  }
  if (in[0] == '-') value *= -1;
  return is;
}
 
__int128_t a[15];
 
int main(){
    for(int i=0;i<10;i++){
        cin>>a[i];
    }
    sort(a, a+10);
    cout<<a[9]<<endl
        <<a[8]<<endl
        <<a[7]<<endl;
}