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;

void swap(int &x, int &y) {
	int a;
	a = x;
	x = y;
	y = a;
}

int main() {
	int a[10],max,mid,min;
	for (int i=0; i<10; i++) {
		cin >> a[i];
	}
	max = a[0];
	mid = a[1];
	min = a[2];
	if (mid > max) {
		swap(max,mid);
	}
	if (min > max) {
		swap(min,max);	
	}
	if (min > mid) {
		swap(min, mid);
	}
	for (int j=3; j<10; j++) {
		if (a[j] > max) {
			min = mid;
			mid = max;
			max = a[j];
		}else if (a[j] > mid) {
			min = mid;
			mid = a[j];
		}else if (a[j] > min) {
			min = a[j];
		}
	}
	cout << max << endl << mid << endl << min << endl;
}

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

using namespace std;

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

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int arr[15];
    for(int i=0;i<10;i++)
    {
        scanf("%d",&arr[i]);
    }
    sort(arr,arr+10);
    printf("%d\n%d\n%d\n",arr[9],arr[8],arr[7]);
    return 0;
}

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

int main() {
    return []() {
        std::function<void()> input;
        std::vector <int> list;
        (input = [&input, &list]() {
            int data;
            if ( std::cin >> data ) {
                list.push_back( data );
                input();
            } else {
                sort( list.rbegin(), list.rend() );
                for_each(
                    list.begin(),
                    list.begin() + 3,
                    [](int x){ std::cout << x << std::endl; }
                );
            }
        })();
        return 0;
    }();
}

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

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <cstring>
 
using namespace std;

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

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

using namespace std;

const int numOfMountain = 10;

int main(int argc, char** argv){
    int mountainBuf;
    vector<int> mountains;

    for(int i = 0; i <= numOfMountain; i++) {
        mountainBuf = atoi(argv[i]);
        mountains.push_back(mountainBuf);
    }

    sort(mountains.begin(), mountains.end());

    __wrap_iter out = mountains.end();
    for(int i = 0; i < 3; i++) {
        cout << *--out << endl;
    }

    return 0;
}

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;

}