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 <bits/stdc++.h>
using namespace std;
#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG true
// sort(a.begin(), a.end(), std::greater<int>());

/*
std::vector<std::string> split(const std::string &input, char delimiter)
{
    std::istringstream stream(input);

    std::string field;
    std::vector<std::string> result;
    while (std::getline(stream, field, delimiter))
    {
        result.push_back(field);
    }
    return result;
}
*/

int main()
{
    vector<int> a(10);
    rep(i, 10)
    {
        cin >> a[i];
    }
    SORT(a);
    rep(i,3){
        cout<<a[i]<<endl;
    }
    return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int a[11];
int main()
{
	int i,max1=-1,max2=-1,max3=-1;
	for(i=1;i<=10;i++)
	{
		cin>>a[i];
		if(a[i]>max1){max3=max2;max2=max1;max1=a[i];}
		else if(a[i]>max2){max3=max2;max2=a[i];}
		else if(a[i]>max3)max3=a[i];
	}
	cout<<max1<<endl<<max2<<endl<<max3<<endl;
	return 0;
}

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

void swap(int& x, int& y){
    int t = x;
    x = y;
    y = t;
}
int main(){
    int height[10];
    //入力
    for(int i = 0;i < 10;i++){
        cin >> height[i];
        if(height[i] < 0 || height[i] > 10000){
            i--;
        }
    }
    //ソート
    for(int i = 0;i < 10;i++){
        for(int j = i;j > 0;j--){
            if(height[j] > height[j-1]){
                swap(height[j], height[j-1]);
            }
        }
    }
    //出力
    for(int i = 0;i < 3;i++){
        cout << height[i] << "\n";
    }
    return 0;
}

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

int main(int argc, char const *argv[]) {
  int input_num = 10;

  list<int> ls;

  int height = 0;
  for (size_t i = 0; i < input_num; i++) {
    cin >> height;
    ls.push_back(height);
  }

  ls.sort(std::greater<int>());

  list<int>::iterator it = ls.begin();
  for (int i = 0; i < 3; i++) {
    cout << *it << endl;
    it++;
  }

  return 0;
}

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

void listen_hills(std::vector<int> &hills);
void echo_top3(const std::vector<int> &hills);

int main()
{
	using namespace std;
	
	vector<int> hills;
	listen_hills(hills);
	sort(hills.begin(),hills.end(),greater<int>());
	echo_top3(hills);
	
	return 0;
}

void listen_hills(std::vector<int> &hills)
{
	using namespace std;
	int tmp;
	for(int hillCount=0;hillCount<10;hillCount++)
	{
		cin>>tmp;
		hills.push_back(tmp);
	}
}

void echo_top3(const std::vector<int> &hills)
{
	using namespace std;
	vector<int>::const_iterator itr=hills.begin();
	for(int count=0;count<3;count++)
	{
		cout<<*itr++<<endl;
	}
}

C++: #include <vector>
#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>
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 EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<=(b);++i)
#define REP(i,n) FOR(i,0,n-1)
const double EPS = 1e-10;
const double PI = acos(-1.0);

int main() {
	vi num(10);
	REP(i, 10) {
		cin >> num[i];
	}

	sort(RALL(num));
	REP(i, 3) {
		cout << num[i] << endl;
	}

	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int T,t3=0,t2=0,t1=0;
	for(int i=0;i>10;i++){
		cin>>T;
		if(T>=t1){
			t1=T;
			t2=t1;
			t3=t2;
		}
		else if(T>=t2){
			t2=T;
			t3=t2;
		}
		else if(T>=t3){
			t3=T;
		}
		cout<<t1<<endl<<t2<<endl<<t3;
	}
}

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

C++: #include <iostream>

auto main () -> int
{
    constexpr auto n = 10;
    int highest [3] = {};
    
    for (int i = 0; i < n; ++ i)
    {
        int h;
        std::cin >> h;
        if (highest [0] < h)
        {
            highest [2] = highest [1];
            highest [1] = highest [0];
            highest [0] = h;
        }
        else if (highest [1] < h)
        {
            highest [2] = highest [1];
            highest [1] = h;
        }
        else if (highest [2] < h)
        {
            highest [2] = h;
        }
    }

    for (auto && elem : highest)
    {
        std::cout << elem << std::endl;
    }
}

C++: #include <functional>
#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,greater<int>());
	for (int i = 0; i < 3; i++)
	{
		cout << a[i] << endl;
	}
	return 0;
}

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

int main(){
  vector<int>height(10);
  for(int i=0;i<10;i++){
    cin >> height.at(i);
  }
  for(int j=0;j<10;j++){
    for(int i=0;i<9;i++){
      if(height.at(i)>height.at(i+1)){
        swap(height.at(i),height.at(i+1));
      }
    }
  }
cout <<height.at(9)<<endl;
cout <<height.at(8)<<endl;
cout <<height.at(7)<<endl;
    return 0;
}

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

C++: #include <iostream>                                             
#include <algorithm>                                            
#define N 10                                                    
using namespace std;                                            
                                                                
int main(void) {                                                
  int height[10];                                               
  for (int i=0; i<N; i++) {                                     
    cin >> height[i];                                           
  }                                                             
  sort(height,height+N);                                        
  reverse(height,height+N);                                     
  for (int i=0; i<3; i++) {                                     
    cout << height[i] << endl;                                  
  }                                                             
  return 0;                                                     
}