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 <iostream>
#include <vector>
#include <queue>

using namespace std;

int main() {
    string str;
    priority_queue<int> q;

    for (int i = 0; i < 10 ; ++i) {
        getline(cin, str);
        int height = stoi(str.c_str());
        q.push(height);
    }

    for (int j = 0; j < 3; ++j) {
        cout << to_string(q.top()) << endl;
        q.pop();
    }

    return 0;
}

C++: #include <stdio.h>
int main(void)
{
  int m[10],i=0,n,r[10],t;
  while(scanf("%d",&m[i]) != EOF)
    {
      i++;
    }
  for (n=0;n!=10;n++)
    {
      t=10;
      for (i=0;i!=10;i++)
        {
          if(m[n]>m[i])
            {
              t--;
            }
        }
      r[n]=t;
    }
  for (n=1;n!=4;n++)
  {
    for (i=0;i!=10;i++)
      {
        if(r[i]==n)
          {
            printf("%d\n",m[i]);
          }
      }
  }
  return 0;
}

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

int main(){
	int height[10];
	int i , j;
	for(i=0 ; i<10 ; i++){
		cin >> height[i] ;
	}
	for(i=9 ; i>0 ; i--){
		for(j=0 ; j<i ; j++){
			if (height[j]>=height[j+1]){
				height[j]^=height[j+1];
				height[j+1]^=height[j];
				height[j]^=height[j+1];
			}
		}
	}
	for(i=9 ; i>6 ; i--){
		cout << height[i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include<vector>
#include<stdlib.h>
#include<algorithm>
#include<string>
using namespace std;



int main(void){

	int height[10];
	int max1=0, max2=0, max3=0;

	for (int i = 0; i < 10; i++){

		cin >> height[i];	
	}



	for (int i = 0; i < 9; i++){
	
		for (int j = i + 1; j < 10; j++){
		
			if (height[i] < height[j]){
				swap(height[i], height[j]);
			}
		
		}
	}

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

	
	return 0;
}

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

int main()
{
    std::array<int, 10> height;
    for (auto i = 0; i < 10; i++) {
        std::cin >> height.at(i);
    }

    std::sort(height.begin(), height.end());

    for (auto i = 9; i > 6; i--) {
        std::cout << height.at(i) << std::endl;
    }

    return 0;
}

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

using namespace std;

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  
  vector<int> nums(10);
  for (int i = 0; i < 10; i++) {
    cin >> nums[i];
  }

  sort(nums.begin(), nums.end(), greater<int>());
  for (int i = 0; i < 3; i++) {
      cout << nums[i] << endl;
  }
}

C++: #include <stdio.h>
#include <math.h>

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

	ans[0] = 0; ans[1] = 0; ans[2] = 0;
	for(int j=0; j<10; j++) {
		if(m[ans[0]] < m[j]) {
			ans[0] = j;
		}
	}
	if(ans[1] == ans[0]) {
		if(ans[1] == 0) ans[1] = 1;
		else ans[1] = ans[0]-1;
	}
	for(int j=0; j<10; j++) {
		if(m[ans[1]] < m[j] && ans[0] != j) {
			ans[1] = j;
		}
	}
	if(ans[2] == ans[0]) {
		if(ans[2] == 0) ans[2] = 2;
		else ans[2] = ans[0]-2;
	}
	for(int j=0; j<10; j++) {
		if(m[ans[2]] < m[j] && ans[0] != j && ans[1] != j) {
			ans[2] = j;
		}
	}
	printf("%d\n%d\n%d\n", m[ans[0]], m[ans[1]], m[ans[2]]);
	return 0;
}

C++: #include <iostream>
#include<algorithm>
#include <functional>
using namespace std;
int a[10],i;
int main()
{
    for(i=0;i<10;i++)
    {
        cin>>a[i];
    }
    sort(a,a+10,greater<int>());
    cout<<a[0]<<endl;
    cout<<a[1]<<endl;
    cout<<a[2]<<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, less<int>());
	cout << a[7] << endl; 
	cout << a[8] << endl;
	cout << a[9] << endl;
}

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

int main(){
	priority_queue<int> a;
	for (int i = 0; i < 10; ++i) {
		int high;
		cin >> high;
		a.push(high);
	}
	for (int i = 0; i < 3; ++i) {
		cout << a.top() << endl;
		a.pop();
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#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());

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

    return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int arra[10],i;
    for(i=0;i<10;i++)
        cin>>arra[i];
    sort(arra,arra+10);
    for(i=9;i>6;i--)
        cout<<arra[i]<<endl;
    return 0;
}

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

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int a[10];

int main() {
    rep (i, 10) scanf("%d", a+i);
    sort(a, a+10);
    reverse(a, a+10);
    rep (i, 3) printf("%d\n", a[i]);
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i=0;i<n;i++)

int main() {
  vector<int> h(10);
  rep(i,10) cin>>h[i];
  sort(h.begin(),h.end());
  cout<<h[9]<<endl<<h[8]<<endl<<h[7]<<endl;
  return 0;
}

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

int main(int argc, char *argv[]){
	int unco[MAX];
	for(int i=0;i<MAX;i++)cin>>unco[i];
	sort(unco, unco+MAX);
	cout<<unco[9]<<endl;
	cout<<unco[8]<<endl;
	cout<<unco[7]<<endl;
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main()
{
    int T,t,a[20];

    for(t=0;t<10;t++)
    {
       scanf("%d",&a[t]);
    }
        sort(a,a+10);

      cout<<a[10-1]<<endl;
      cout<<a[10-2]<<endl;
      cout<<a[10-3]<<endl;

      return 0;
}

C++: #include <iostream>

int main(int argc, const char * argv[])
{
    using namespace std;
    int max = 0;
    int second = 0;
    int third = 0;
    
    int n[10];
    int swap;
    
    for(int i = 0; i < 10; i++) {
        cin >> n[i];
    }
    for(int i = 0; i < 10; i++) {
        if(max < n[i]) {
            if(max > second) {
                swap = second;
                second = max;
                if (swap > third) {
                    third = swap;
                }
            }
            max = n[i];
        }
        else if(second < n[i]) {
            if (third > second) {
                third = second;
            }
            second = n[i];
        }
        else if(third < n[i]) {
            third = n[i];
        }
    }
    
    cout << max << "\n" << second << "\n" << third << "\n";
    return 0;
}

C++: #include<iostream>

using namespace std;

void Swap(int *a,int *b){
	int tmp = *a;
	*a = *b;
	*b = tmp;
}

int main(){

	int a[10];

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

	int i,j;
	for(i=0;i<10;i++){
		for(j=9;j>i;j--){
			if(a[j]<=a[j-1]){
				Swap(&a[j],&a[j-1]);
			}
		}
	}

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

	return 0;
}