Go: // 九九を出すだけ
package main
import (
	"fmt"
	"os"
	"bufio"
	"strconv"
	"sort"
)

var sc = bufio.NewScanner(os.Stdin)
var out = bufio.NewWriter(os.Stdout)

func main(){
	sc.Split(bufio.ScanWords)
	defer out.Flush()
	mountains := make([]int, 10)
	for i:=0; i<10; i++{
		mountains[i]=nextInt()
	}
	sort.Ints(mountains)
	for _, v := range mountains[7:]{
		fmt.Fprintln(out, v)
	}
}

func next() string{
	sc.Scan()
	return sc.Text()
}

func nextInt() int{
	a, _ := strconv.Atoi(next())
	return a
}

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

static const int DataMax = 100;

static void input(std::vector<int>& hills)
{
    int val = 0;

    while (std::cin >> val) {
        hills.push_back(val);
    }
}

static int getMax(std::vector<int>& hills)
{
    std::sort(hills.begin(), hills.end());
    int ret = hills.back();
    hills.pop_back();

    return ret;
}

int main()
{
    std::vector<int> vec;

    input(vec);
    for (int i = 0; i < 3; i++) {
        std::cout << getMax(vec) << std::endl;
    }

    return 0;
}

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

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

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

C++: #include<stdio.h>
const int N = 10000;
int main()
{
	int a[N];
	for(int i = 0; i < 10; i++)
	{
		scanf("%d", &a[i]);
	}
	for(int i = 0; i < 10; i++)
	{
		for(int j = 0; j < 10; j++)
		{
			if(a[i] < a[j])
			{
				int temp = a[i];
				a[i] = a[j];
				a[j] = temp;
			} 
		}
	}
	printf("%d\n", a[9]);
	printf("%d\n", a[8]);
	printf("%d\n", a[7]);
	
	return 0;
}

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

#define SIZE 10

using namespace std;

int main(void) {
	vector<int> list;
	for (int i = 0; i < SIZE; i++) {
		int n;
		cin >> n;
		list.push_back(n);
	}
	sort(list.begin(), list.end());

	for (int i = 9; i >= 7; i--) {
		cout << list[i] << "\n";
	}
	int n;
	cin >> n;
	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);
	for(int i=0;i<3;i++){
		cout<<a[i]<<endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int a;
  int x=0;
  int y=0;
  int z=0;
  for(int i=1;i<=10;i++){
    cin >> a;
    if(a>x){
      x=a;
    }else if(y<a<=x){
      y=a;
    }else if(z<a<=y){
      z=a;
    }
  }
  cout << x << endl;
  cout << y << endl;
  cout << z << endl;
}

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

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

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

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

int main() {

	int yama[10];
	
	for(int i = 0; i <= 9; i++) {
	cin >> yama[i];
	}
	
	for(int i = 0; i <= 8; i++) {
		for(int j = i + 1; j <= 9; j++) {
			if(yama[i] < yama[j]){
				int x = yama[i];
				yama[i] = yama[j];
				yama[j] = x;
			}
		}
			
	}
	cout << yama[0] << endl << yama[1] << endl << yama[2] << endl;
	
    return 0;
}

C++: #include <iostream> using namespace std; int main() { int i=0; int num[10]; for(;i<10;i++) cin>>num[i]; int temp=0,temp1=0,j=0,k=0; for(;j<3;j++) { for(i=0;i<10;i++) { temp1=temp; temp=temp<num[i]?num[i]:temp; if(temp>temp1) k=i; } cout<<num[k]<<endl; temp=0; num[k]=0; } return 0; }

C++: #include <iostream>
#include <vector>
using namespace std;
int main(){
    vector<int> height;
    int h;
    while (cin>>h) {
        height.push_back(h);
    }
    sort(height.begin(), height.end());
    for(int i=1;i<=3;i++){
        cout<<height[height.size()-i]<<endl;
    }
    return 0;
}

C++: #include<iostream>
 using namespace std;
int main()
{
  int a,b,c,d,e,f,g,h,i,j,x,y,z;
  while(cin>>a,b,c,d,e,f,g,h,i,j)
  {
	  if(a>0)x=a;
	  if(b>a)x=b;
	  if(c>a)x=c;
	  if(d>a)x=d;
	  if(e>a)x=e;
	  if(f>a)x=f;
	  if(g>a)x=g;
	  if(h>a)x=h;
	  if(i>a)x=i;
	  if(j>a)x=j;
	   if(a>0&&a<x)y=a;
	  if(b>a&&b<x)y=b;
	  if(c>a&&c<x)y=c;
	  if(d>a&&d<x)y=d;
	  if(e>a&&e<x)y=e;
	  if(f>a&&f<x)y=f;
	  if(g>a&&g<x)y=g;
	  if(h>a&&h<x)y=h;
	  if(i>a&&i<x)y=i;
	  if(j>a&&j<x)y=j;
	   if(a>0&&a<x,y)z=a;
	  if(b>a&&b<x,y)z=b;
	  if(c>a&&c<x,y)z=c;
	  if(d>a&&d<x,y)z=d;
	  if(e>a&&e<x,y)z=e;
	  if(f>a&&f<x,y)z=f;
	  if(g>a&&g<x,y)z=g;
	  if(h>a&&h<x,y)z=h;
	  if(i>a&&i<x,y)z=i;
	  if(j>a&&j<x,y)z=j;
	  cout<<x<<endl;
	  cout<<y<<endl;
	  cout<<z<<endl;
  }
	return 0;
}

C++: #include <stdio.h>


int main(){
	int h[3]={0,0,0};
	int c,i;
	for(i=0;i<10;i++){
		scanf("%d",&c);
		if(c>h[0]){
			h[2]=h[1];
			h[1]=h[0];
			h[0]=c;
		}else if(c>h[1]){
			h[2]=h[1];
			h[1]=c;
		}else if(c>h[0]){
			h[2]=c;
		}
	}
	for(i=0;i<3;i++){
		printf("%d\n",h[i]);
	}
}

C++: #include <cstdio>
#include <cstdlib>
#include <iostream>
#include <algorithm>
using namespace std;
int a[11];
int main()
{
	for(int i=1;i<=10;i++)cin>>a[i];
	sort(a+1,a+11);
	cout<<a[10]<<endl;
	cout<<a[9]<<endl;
	cout<<a[8]<<endl;
	return 0;
}

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

int main(){
    int x;
    int h[3];
    for(int a=0;a<10;a++){
        cin >> x;
        if(x>h[0]){
            h[2] = h[1];
            h[1] = h[0];
            h[0] = x;
        }else if(x>h[1]){
            h[2] = h[1];
            h[1] = x;
        }else if(x>h[2]){
            h[2] = x;
        }
    }
    cout << h[0] << "\n" << h[1] << "\n" << h[2] << "\n";
    return 0;
}

C++: #include <iostream>
#include<stdlib.h>

using namespace std;

int main() {
	const int len = 10;
	int arr[len];

	for (int i = 0; i < len; i++)
		cin >> arr[i];

	for (int i = 0; i < len; i++)
		for (int j = 0; j < len; j++)
			if (arr[i] < arr[j])
				swap(arr[i], arr[j]);

	cout << endl;

	for (int i = len - 1; len - 4 < i; i--)
		cout << arr[i] << endl;

	return 0;
}

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;
}