Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func getsAsIntArray() (line []int) {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		str := scanner.Text()
		if str == "" {
			break
		}
		data, err := strconv.Atoi(str)
		if err != nil {
			break
		}
		line = append(line, data)
	}

	return
}

func main() {

	lines := getsAsIntArray()
	sort.Sort(sort.Reverse(sort.IntSlice(lines)))
	for i, v := range lines {
		if i < 3 {
			fmt.Println(v)
		}
	}
}

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

int main() {
	int height[10];
	int first=0, second=0, third=0;
	int i=0;
	for (;i<10;i++)
		cin>>height[i];
	for (i=0;i<10;i++)
		if (first<=height[i])
			first=height[i];
	for (i=0;i<10;i++)
		if (second<=height[i]&&first>height[i])
			second=height[i];
	for (i=0;i<10;i++)
		if (third<=height[i]&&second>height[i])
			third=height[i];
	cout<<first<<endl<<second<<endl<<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;
}

C++: #include<stdio.h>
int main(void){
  int i,x,y,z,s,a;
    scanf("%d",&x);
    scanf("%d",&y);
    if(x<y){
      s=x;
      x=y;
      y=s;
    }
    scanf("%d",&z);
    if(x<z){
      s=x;
      x=z;
      z=y;
      y=s;
    }
    if(x>=z&&y<z){
    s=y;
    y=z;
    z=s;
}
    for(i=0;i<7;i++){
      scanf("%d",&a);
      if(a>x){
	s=x;
	x=a;
	z=y;
	y=s;
	a=0;
      }
      if(x>=a&&a>y){
	s=y;
	y=a;
	z=s;
	a=0;
      }
      if(y>=a&&z<a){
	z=a;
      }
    }
    printf("%d\n",x);
    printf("%d\n",y);
    printf("%d\n",z);
    return(0);
}

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

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

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

int main(){
  int t[10];

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

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

C++: #include<iostream>
int main() {
	int n[10];
	for (int i = 0;i < 10;++i){
		std::cin>>n[i];
	}
	for (int i = 0;i < 10;++i) {
		for (int j = 0;j < 10;++j) {
			if (i < j) {
				if (n[i]>n[j]) {
					int a = n[i];
					n[i] = n[j];
					n[j] = a;
				}
			}
		}
	}
	std::cout << n[9] << std::endl;
	std::cout << n[8] << std::endl;
	std::cout << n[7] << std::endl;
	return 0;
}

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

int main()
{
    using namespace std;
    int v1, v2, v3, input;
    v1 = v2 = v3 = 0;
    while (cin >> input) {
        if (v1 < input) {
            v3 = v2; v2 = v1; v1 = input;
        } else if (v2 < input) {
            v3 = v2; v2 = input;
        } else if (v3 < input) {
            v3 = input;
        }
    }
    cout <<
    v1 << endl <<
    v2 << endl <<
    v3 << endl;
}

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

int main()
{
	unsigned length[10]={};
	for(int i=0; i<10; ++i)
	{
		cin >> length[i];
	}
	sort(begin(length), end(length), greater<unsigned>());
	cout << length[0] << '\n' << length[1] << '\n' << length[2] << '\n';
}

C++: 
/* vo01.cpp */
#include <iostream>
#include <queue>
using namespace std;

int main()
{
	priority_queue<int> que;
	int h;

	for (int i = 0; i < 10; ++i) { cin >> h; que.push(h); }

	int c = 0;
	while (c < 3) {
		cout << que.top() << '\n'; que.pop();
		c++;
	}

	return 0;
}

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

using namespace std;

int main(void)
{
	int mt[10];

	

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


	sort(mt, mt + 10, greater<int>());
	
	for (int i = 0; i < 3; i++)
	{
		cout << mt[i] << endl;
	}

	return 0;
}

C++: #include <iostream>
int main() {
 int a[10];
 for (int i = 0; i<10; i++)
  std::cin >> a[i];
 for (int i = 0; i<3; i++)
  for (int j = i+1; j<10; j++)
   if (a[j] > a[i]) {
    int tmp = a[j];
    a[j] = a[i];
    a[i] = tmp;
   }
 for (int i = 0; i<3; i++)
  std::cout << a[i] << std::endl;
 return 0;
}

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

C++: #include<bits/stdc++.h>

using namespace std;

int x[1000];
int temp[1000];
void MargeSort(int x[],int left,int right){
    int i,j,mid,k;
    if(left>=right)return;
    mid=(left+right)/2;
    MargeSort(x,left,mid);
    MargeSort(x,mid+1,right);
    for(i=left;i<=mid;i++){
        temp[i]=x[i];
    }
    for(i=mid+1,j=right;i<=right;i++,j--){
        temp[i]=x[j];
    }
    i=left; j=right;
    for(k=left;k<=right;k++){
        if(temp[i]>=temp[j])x[k]=temp[i++];
        else x[k]=temp[j--];
    }
}

int main(){
    int num=10;
    for(int i=0;i<num;i++){
        cin>>x[i];
    }
    MargeSort(x,0,num-1);
    for(int i=0;i<3;i++){
        cout<<x[i]<<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);
	cout << a[9]<<endl;
	cout << a[8]<<endl;
	cout << a[7]<<endl;
	return 0;
}

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

using namespace std;

int main(void){
	int count = 0;
	int arr[10];
	cin >> arr[0] >> arr[1] >> arr[2] >> arr[3] >> arr[4] >> arr[5] >> arr[6] >> arr[7] >> arr[8] >> arr[9];
	set<int, greater<int> > nums;
	for (int i=0; i<10; ++i){
		nums.insert(arr[i]);
	}
	set<int, greater<int> >::iterator it = nums.begin();
	int n = 0;
	while (it != nums.end() && (n<3)){
		cout << *it << endl;
		++it;
		++n;
	}

	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cstring>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(n) rep(i,n)
#define all(n) n.begin(),n.end()
#define foreach(it,c) for(typeof(c.begin()) it=c.begin();it!=c.end();++it)

int main()
{
    vector<int> h; 
    int t;
    REP(10){ cin >> t; h.push_back(t);}
    sort(all(h));
    cout << h[9] << endl;
    cout << h[8] << endl;
    cout << h[7] << endl;

    return 0;
}

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

int main()
{
  int high;
  int temp1,temp2;
  int first=0,second=0,third=0;
  
  for(int i=0;i<10;i++){
    cout<<"山の高さ"<<i<<":";
    cin>>high;
    if(high>first){
      temp1=first;
      first=high;
      temp2=second;
      second=temp1;
      third=temp2;
    } else if (first>=high && high>second){
      temp2=second;
      second=high;
      third=temp2;
    } else if (second>=high && high>third){
      third=high;
    }
  }

  cout<<"1番目に高い山の高さ:"<<first<<endl;
  cout<<"2番目に高い山の高さ:"<<second<<endl;
  cout<<"3番目に高い山の高さ:"<<third<<endl;
  
  return 0;
}

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

int main() {
    vector<int> mountain;
    for(int i = 0; i < 10; i++){
      cin >> mountain.at(i);
    }
    sort(mountain.begin(), mountain.end());
    reverse(mountain.begin(), mountain.end());

    for (int i = 0; i < 3; i++) {
        cout << mountain.at(i) << endl;
    }
}