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 <algorithm>
#include <cstdio>
#include <functional>

using namespace std;

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

    sort(height, height + 10, greater<int>());

    printf("%d\n%d\n%d", height[0], height[1], height[2]);
    return 0;

}

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

int main(){
	int hill;
	int tops[3] = {0};
	for(int i = 0; i < 10; i++){
		cin >> hill;
		int j;
		for(j = 0; j < 3; j++){
			if(tops[j] < hill){
				for(int k = 2; k > j; k--){
					tops[k] = tops[k - 1];
				}
				tops[j] = hill;
				break;
			}
		}
	}
	for(int i = 0; i < 3; i++){
		cout << tops[i] << endl;
	}
	return 0;
}

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

using namespace std;

int main() {
    vector<int> m;
    for(int i=0; i<10; ++i) {
        int t;
        cin >> t;
        m.push_back(t);
    }

    sort(m.rbegin(),m.rend());

    cout << m[0] << endl;
    cout << m[1] << endl;
    cout << m[2] << endl;

    return 0;
}

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

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

	for (int i = 0; i < 3; i++){
		std::cout << a[i]<<std::endl;
	}

	return 0;
}

C++: #include<bits/stdc++.h>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<algorithm>
using namespace std;


int main(){
    vector<int> s(10);
    for(auto&e:s){
        scanf("%d",&e);
    }
    sort(s.begin(),s.end(),greater<int>());
    for(int i=0;i<3;i++){
        printf("%d\n",s[i]);
    }
    return 0;
}

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

int comparefunc(const void *a,const void *b)
{
    return(*(int*)b - *(int*)a);
}

int main()
{
    int height[10],i;
     while(1!=EOF){
        for(i=0;i<10;i++){
            scanf("%d",&height[i]);
        }
        qsort(height,10,sizeof(int),comparefunc);

        for(i=0;i<3;i++){
            printf("%d\n",height[i]);
        }
     }
     return 0;
}

C++: #include <cstdio>
int main(){
 int top3[3];
 int i,tmp,data;
 for(i=0;i<3;i++) top3[i]=0;
 for(i=0;i<10;i++){
  scanf("%d",&data);
  if (top3[2]>data) {} 
  else {
   top3[2]=data;
   if (top3[1]>data) {} 
   else {
    top3[2]=top3[1];
    if (top3[0]>data) top3[1]=data;
    else {
     top3[1]=top3[0];
     top3[0]=data;
    };
   };
  };
 };
 for(i=0;i<3;i++)
    printf("%d\n",top[i]);
 return 0;
};

C++: #include <string>
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <utility>
#include <vector>


using namespace std;

int main(void) {
	int buf;
	vector<int> v(10);
	for(int i = 0; i < 10; i++){
		cin >> buf;
		v[i] = buf;
	}
	sort(v.begin(), v.end());
	cout << v[9] << endl;
	cout << v[8] << endl;
	cout << v[7] << endl;
}

C++: a[],i;
c(int*a){a=*a-*1[&a];}
main(){~scanf("%d",a+i++)&&main()||(c=!printf("%d\n%d\n%d\n",*a,a[1],a[2]));}

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

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

int main()
{
  int a[10];
  vector<int>m;

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

  sort(m.begin(),m.end(),greater<int>());

  for(int i=0; i<3; i++)
  {
    cout<<m[i]<<endl;
  }

  return 0;
}

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

int main(void){
    int num, i;
    string str;
    vector<int> v;
    v.resize(10);

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

    sort(v.begin(), v.end());
    for(int i = 1; i < 4; i++){
        cout << v[v.size() - i] << endl;
    }
}

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

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

    std::priority_queue<int> pq;
    for(int i=0; i<10; ++i){
        int input;
        std::cin >> input;
        pq.push(input);
    }
    for(int i=0; i<3; ++i){
        std::cout << pq.top() << "\n"; pq.pop();
    }
    return 0;
}

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

int main() {
    int M[10];
    for(int i=0;i<10;++i) {
        scanf("%d",&M[i]);
    }
    sort(M,M+10);
    printf("%d\n%d\n%d\n",M[9],M[8],M[7]);
}

C++:  #include<iostream>
 #include<stdio.h>
 #include<string>
 #include<math.h>
 #include<iomanip>
 #include<algorithm>
 #include<string.h>
 #include<cctype>
 #include<map>
 #include<set>
 #include<vector>
 #include<sstream>
 
 using namespace std;

 int main()
 {
   int first,second,third;
   first=second=third=0;
   int N;
   while(cin>>N)
   {
     if(first<N) first=N;
     else if(second<N) second=N;
     else if(third<N) third=N;                 
   }
   cout<<first<<endl;
   cout<<second<<endl;
   cout<<third<<endl;
   //while(1);      
   return 0;    
 }

C++: #include<iostream>

using namespace std;

int main()
{
	int sum,heights[10];
	for(int i = 0; i<10;i++)
	{
		cin>>heights[i];
	}
	for(int i = 1;i<10;i++)
		if(heights[i]>heights[0])
		{
			sum = heights[i];
			heights[i] = heights[0];
			heights[0] = sum;
		}
		//heights[0] = heights[i]>heights[0]?heights[i]:heights[0];
	for(int i = 2;i<10;i++)
		if(heights[i]>heights[1])
		{
			sum = heights[i];
			heights[i] = heights[1];
			heights[1] = sum;
		}
		//heights[1] = heights[i]>heights[1]?heights[i]:heights[1];
	for(int i = 3;i<10;i++)
		if(heights[i]>heights[2])
		{
			sum = heights[i];
			heights[i] = heights[2];
			heights[2] = sum;
		}
		//heights[2] = heights[i]>heights[2]?heights[i]:heights[2];
	cout<<heights[0]<<endl;
	cout<<heights[1]<<endl;
	cout<<heights[2]<<endl;
	return 0;
}

C++: #include<iostream>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<cstring>
#include<algorithm>
#include<vector>
#include<map>
#include<stack>
#include<queue>
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#define eps 1e-6
#define INF (1<<20)
#define PI acos(-1.0)
#define MAX 100005
#ifdef LOCAL
//#include<windows.h>
#endif // LOCAL
using namespace std;

int main(int argc,char argv[])
{
    #ifdef LOCAL
    freopen("in.txt","r",stdin);
    //freopen("out.bat","w",stdout);
    #endif // LOCAL
    vector<int> v;
    v.reserve(10);
    for(int i(0);i!=10;++i)
    {
        int x;
        scanf("%d",&x);
        v.push_back(x);
    }
    sort(v.begin(),v.end(),greater<int>());
    printf("%d\n%d\n%d\n",v[0],v[1],v[2]);
    return 0;
}