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 repi(i,a,b) for(int i=(a), i##_len=(b); i<i##_len; ++i)
#define rep(i,n) repi(i,0,n)
#define repi_(i,a,b) for(int i=(a), i##_len=(b); i<=i##_len; ++i)
#define rep_(i,n) repi_(i,0,n)
#define all(x) (x).begin(),(x).end()
#define vsort(v) sort((v).begin(), (v).end())
#define gsort(v) tsort(v); reverse((v).begin(), (v).end())
#define vrev(v) reverse((v).begin(), (v).end())
#define siz(v) ((int)(v).size())
#define ers(v, n) (v).erase((v).begin() + n)
#define cnt(v, n) count(all(v), n)
#define vmin(v) *min_element(v.begin(), v.end())
#define vmax(v) *max_element(v.begin(), v.end())
#define el "\n"
#define co(x) cout<<(x)<<el
#define coc(c, a, b) if(c)co((a));else co((b))
#define cosp(x) cout<<(x)<<' '
#define YES(c) coc(c,"YES", "NO")
#define Yes(c) coc(c,"Yes", "No")
#define yes(c) coc(c,"yes", "no")
#define POSSIBLE(c) coc(c, "POSSIBLE", "IMPOSSIBLE")
#define Possible(c) coc(c, "Possible", "Impossible")
#define possible(c) coc(c, "possible", "impossible")
#define inf INT_MAX
#ifdef tqktmp_2
#define gc() getchar(); getchar()
#else
#define gc() 1
#endif
const unsigned int bf0 = (1 << 0);
const unsigned int bf1 = (1 << 1);
const unsigned int bf2 = (1 << 2);
const unsigned int bf3 = (1 << 3);
const unsigned int bf4 = (1 << 4);
const unsigned int bf5 = (1 << 5);
const unsigned int bf6 = (1 << 6);
const unsigned int bf7 = (1 << 7);

typedef long long lint;
typedef vector<int> ivec; typedef vector<string> svec;

lint dx[8] = { 0,1,1,1,0,-1,-1,-1 },
dy[8] = { 1,1,0,-1,-1,-1,0,1 };

template<class T>inline bool maxi(T &a, const T &b) { if (a<b) { a = b; return 1; } return 0; }
template<class T>inline bool mini(T &a, const T &b) { if (b<a) { a = b; return 1; } return 0; }




int main() {
	cin.tie(0);
	ios::sync_with_stdio(0);

	lint a[10];
	rep(i, 10)cin >> a[i];
	sort(a, a + 10);
	rep(i, 3)co(a[9 - i]);
	gc();
}

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

int main()
{
int a[10];
int b[10];
for(int i=0;i++;i<10)
{
cin>>a[i];
for(int j=0;j++;j<10)
{
if(a[i]>b[j])
{
for(int k=10-j;k--;k>0)
{
b[j+k]=b[j+k-1];
}
b[j]=a[i];
break;
}
}
}
for(int n=0;n++;n<3)
{
cout<<b[n];
}
}

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

int main() {
  int N ;
  vector<int>Mountain(N);
  for(int i = 0; i < N; i++){
    cin >> Mountain(i);
  }
  sort(Mountain.begin(), Mountain.endl());

  for(int j = 0; j < 3; j++){
    cout << Mountain(j) << endl;
  }
    }
  }
}

C++: #include <istream>
#include <fstream>
#define SIZE 10
#define TOPNUM 3
using namespace std;

int main(){
	ifstream ifs("data.txt");
	if( !ifs ) return 1;
	int height[SIZE],top[TOPNUM+1]={0};
	for( int i=0;i<SIZE;i++ ){
		ifs>>height[i];
		if( height[i]<0||10000<height[i] )
			return 1;
		for( int j=0;j<TOPNUM;j++ ){
			if( height[i]>top[j] ){
				for( int k=TOPNUM;k>j;k-- ){
					top[k]=top[k-1];
				}
				top[j]=height[i];
				break;
			}
		}
	}
	for( int i=0;i<TOPNUM;i++ ){
		cout<<top[i]<<endl;
	}
}

C++: #include <iostream>

using namespace std;

void reverse(int *array, int length) {
	int i;
	int j;
	for(i=0;i<length-1;i++){
		for(j=i+1;j<length;j++){
			if(array[i]<array[j]){
				int temp=array[i];
				array[i]=array[j];
				array[j]=temp;
			}
		}
	}
}

int main() {
	int mountain[10];
	for (int i = 0; i < 10; i++) {
		cin >> mountain[i];
	}
	reverse(mountain, 10);
	for (int i = 0; i < 3; i++) {
		cout << mountain[i] << endl;
	}
}

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

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

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

int first = 0, second = 0, third = 0;

//for sort
void sort(){
	int buf = third;
	if(third > first){
	//3rd > 1st ,1->2 2->3 3->1
		third = second;
		second = first;
		first = buf;
	}else if(third > second){
	//3rd > 2nd ,2->3 3->2
		third = second;
		second = buf;
	}
}

int main(){
int buf;

for(int i = 0; i < 10; i++){
	cin >> buf;
	if(buf > third){
		third = buf;
		sort();
	}
}

//show
cout << first << "\n";
cout << second << "\n";
cout << third << "\n";

return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
	int T,t3,t2,t1;
	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;
	return 0;
}

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

int main()
{
  int m[10];
  int max = 0;
  for (int i=0; i<10; i++)
  {
    cin >> m[10];
  }
  for(int i=0; i<3; i++)
  {
    for(int j=0; j<9; j++)
    {
      if ( m[i] < m[i+1] ) max = i+1;
    }
    cout << m[max] << endl;
    m[max] = -1;
  }
}

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

using namespace std;

const int N = 10;
int a[N];

int main() {
  for(int i = 0; i < N; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a+N);
  for(int i = 0; i < 3; i++) printf("%d/n", a[i]);
}

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

int main(){
  int array[10];
  
  for(int i=0; i<10; i++){
    std::cin >> array[i];
  }
  
  std::vector<int> vector(array, array+10);
  std::sort(vector.begin(), vector.end());
  for(int i=0; i<3; i++){
    std::cout << vector[i] << std::endl;
  }
  
  return 0;
}

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

int main(void) {
	int a[10] = { 0 };
	for (int i = 0; i < 10; i++) {
		cin >> a[i];
	}
	for (int j = 0; j < 3; j++) {
		int max = 0, label = 0;
		for (int i = 0; i < 10; i++) {
			if (a[i] > max) {
				max = a[i];
				label = i;
			}
		}
		cout << max << endl;
		a[label] = 0;
	}
	return 0;
}

C++: #include <iostream>


void Sort(int* a){
int tmp;
for(int i=0;i<10;i++){
for(int j=0;j<9;j++){
if(a[j]<a[j+1]){
tmp = a[j+1];
a[j+1]=a[j];
a[j] = tmp;
}
}
}
}



int main(){

int a[10];

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

std::cout << a[0] << std::endl;
std::cout << a[1] << std::endl;
std::cout << a[2] << std::endl;


}