Go: package main

import "fmt"

func main() {
	var height int
	topHeights := [5]int{}

	for i := 0; i < 10; i++ {
		fmt.Scan(&height)

		for j := 0; j < 3; j++ {
			if topHeights[j] < height {
				topHeights[j+2] = topHeights[j+1]
				topHeights[j+1] = topHeights[j]
				topHeights[j] = height
				break
			}
		}
	}

	for i := 0; i < 3; i++ {
		fmt.Println(topHeights[i])
	}
}

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

int main() {
    int h[10] = {};
    for(int i=0; i<10; ++i) {
        cin >> h[i];
    }
    sort(rbegin(h), rend(h));
    for(int i=0; i<3; ++i) {
        cout << h[i] << endl;
    }
}

C++: #include<iostream>
using namespace std;
int main(){
  int a[10];
  for(int i=0;i<10;i++){
    cin>>a[i];
  }

  int temp;
  for(int i=9;i>=7;i--){
    for(int j=0;j<i;j++){
        if(a[i]<a[j]) {
          temp=a[i];
          a[i]=a[j];
          a[j]=temp;}
    }
    cout<<a[i]<<endl;
  }
  return 0;
}

C++: #include<iostream>

using namespace std;


int main(void){
	
	int arr[10];
	
	for(int i=0;i<10;i++){
		cin>>arr[i];
	}
	
	
	for(int i=0;i<9;i++){
		for(int j=i+1;j<10;j++){
			if(arr[i]<arr[j])
				swap(arr[i],arr[j]);
		}
	}
	
	
	for(int i=0;i<3;i++){
		cout<<arr[i]<<endl;
	}
	
	return 0;
}

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

int main(){
  int n[10];

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

  for(int j=0; j<3; j++) {
    cout << n[9-j] << "\n";
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

void swap(int &x1, int &x2)
{
	int tmp = x1;
	x1 = x2;
	x2 = tmp;
}

int main()
{
	int h1, h2, h3;
	h1 = h2 = h3 = 0;

	for (int i = 0; i < 10; i++) {
		int x;
		cin >> x;
		if (x > h3) {
			swap(x, h3);
			if (h3 > h2) {
				swap(h3, h2);
				if (h2 > h1) {
					swap(h2, h1);
				}
			}
		}
	}
	cout << h1 << endl;
	cout << h2 << endl;
	cout << h3 << endl;
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(int argc, const char * argv[])
{
    int height[10];
    for (int i=0; i<10; i++) {
        cin >> height[i];
    }
    sort(height, height+10, greater<int>());
    
    for (int i=0; i<3; i++) {
        cout << height[i] << endl;
    }
    
    return 0;
}

C++: #include <string>
#include <vector>
#include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int a[10],i;
    for(i=1;i<11;i++)cin>>a[i];
    sort(a,a+10);
    for(i=10;i>7;i--)cout<<a[i]<<endl;
    

    return 0;
}

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

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

using namespace std;

int main()
{
    vector <int>s;
   for (int i=0;i<10;i++)
   {
       int a;
       cin >> a;
       s.push_back(a);
   }
   sort(s.begin(),s.end(),greater <int>());
   for (int i=0;i<3;i++)
   {
       cout << s[i] << endl;
   }

    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int a, max1, max2, max3;
     max1 = max2 = max3 = INT_MIN;
   while(cin >> a)
   {
       if(a > max3)
       {
           max3 = a;
           if(a > max1)
           {
               max3 = max2;
               max2 = max1;
               max1 = a;

           }
           else if( a > max2)
           {
               max3 = max2;
               max2 = a;
           }
       }

   } cout << max1 << endl << max2 << endl << max3 <<endl;

    return 0;
}

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

int main(int argc, const char * argv[]) {
    // insert code here...
    cin.tie(0);
    ios::sync_with_stdio(false);
    vector<int> vc;
    
    for(int i = 0; i < 10; i++){
        int x;
        cin >> x;
        vc.push_back(x);
    }
    
    sort(vc.begin(), vc.end(), greater<int>());
    
    for(int i = 0; i < 3; i++){
        cout << vc[i] << endl;
    }

    return 0;
}

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

int main(){
	
	int height[10] = {};

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

	int f = 0, s = 0, t = 0;

	for (int i = 0; i < 9; i++){
		if (height[i] > t){
			t = height[i];
		}
		if (t > s){
			swap(s, t);
		}
		if (s > f){
		swap(f,s);
		}
	}
    
		return 0;
}

C++: #include<iostream>
using namespace std;
int main(void)
{
  int a[10]={};
  int i=0;
  int j=0;

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

  sort(a,a+10);

  cout<<a[9]<<endl<<a[8]<<endl<<a[7]<<endl;

}

C++: #include<stdio.h>
int main(){
int m[11],i,j,work;
for(i=0;i<10;i++){
 scanf("%d",&m[i]);
}
for(i=0;i<10;i++){
 for(j=0;j<10;j++){
  if(m[i]>m[j]){
   work=m[i]; m[i]=m[j]; m[j]=work;
   }
  }
 }
for(i=0;i<3;i++){
 printf("%d\n",m[i]);
}
return 0; }

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

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

  sort(h, h+10);

  printf("%d\n%d\n%d\n",a[9],a[8],a[7]);
  return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(){
	int h[10];
	int a;

	for(int k=0;k<10;k++){
		cin>>h[k];
	}
	for(int i=0;i<10;i++){
		for(int j=i+1;j<10;j++){
			if(h[i]<h[j]){
				a = h[i];
				h[i] = h[j];
				h[j] = a;
			}
		}
	}
	cout<<h[0]<<endl;
	cout<<h[1]<<endl;
	cout<<h[2]<<endl;

	return 0;
}

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

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

C++: #include <stdio.h>

int fir(const int *);
int sec(const int *);
int thi(const int *);

int main(void)
{
	int i, h[10];
	for (i = 0; i<10; i++){
		scanf("%d", &h[i]);
	}
	printf("%d\n", fir(h));
	printf("%d\n", sec(h));
	printf("%d\n", thi(h));
	return 0;
}

int fir(const int *h){
	int i, f = 0;
	for (i = 0; i<10; i++){
		f = f < h[i] ? h[i] : f;
	}
	return f;
}

int sec(const int *h){
	int i, f=0, s=0;
	for (i = 0; i<10; i++){
		f = f < h[i] ? h[i] : f;
	}
	for (i = 0; i<10; i++){
		s= f >= h[i] && s<h[i] ? h[i] :s;
	}
	return s;
}

int thi(const int *h){
	int i, f=0, s=0, t=0;
	for (i = 0; i<10; i++){
		f = f < h[i] ? h[i] : f;
	}
	for (i = 0; i<10; i++){
		s = f >= h[i] && s<h[i] ? h[i] : s;
	}
	for (i = 0; i<10; i++){
		t = f >= h[i] && t<h[i] ? h[i] : t;
	}
	return t;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cctype>
#include<algorithm>
#define pf printf
#define sf scanf
#define wh while
#define db double
#define LL long long
#define _USE_MATH_DEFINES
#define re(i,a,b) for(int i=a;i<b;i++)
#define rev(i,a,b) for(int i=a;i>=b;i--)

using namespace std;
bool my(int i,int j){return (i>j);}
int main()
{
    int a[10];
    re(i,0,10)sf("%d",&a[i]);
    sort(a,a+10,my);
    re(i,0,3)pf("%d\n",a[i]);
    return 0;
}

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

int main()
{
  int a[11]={0};
  int i,j,maxa,maxb,maxc;
  

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

  for(i=0; i<10; i++){
    for(j=0; j<10; j++){
      if(a[i]<a[j]){
	swap(a[i],a[j]);
      }
    }
  }

  maxa=a[0];
  maxb=a[1];
  maxb=a[2];

  printf("%d\n%d\n%d\n",maxa,maxb,maxc);
  
  return 0;
}

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

int main(){
	int a,b,c,x;

	for(int i=0;i<=9;i++){
		cin >> x;

		if(x>a){
			c=b;
			b=a;
			a=x;
		}else if(x>b){
			c=b;
			b=x;
		}else if(x>c){
			c=x;
		}
	}

	cout << a << endl;
	cout << b << endl;
	cout << c << endl;

	return 0;
}