Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	mt := make([]int, 10)

	for i := 0; i < 10; i++ {
		fmt.Scan(&mt[i])
	}

	sort.Ints(mt)
	fmt.Printf("%d\n%d\n%d\n", mt[9], mt[8], mt[7])

}

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

vector <int> v;
int hom;

int main(){
        while(cin >> hom){
                v.push_back(hom);
        }
        sort(v.begin(), v.end() );
        for(int i=v.size()-1;i>v.size()-4;i--){
                cout << v[i] << endl;
        }
}

C++: #include<iostream>
using namespace std;
int main() {
	int x, a, b, c;
	a = 0;
	b = 0;
	c = 0;
	for (int i = 0; i <= 9; i++) {
		cin >> x;
		if (a <= x) {
			c = b;
			b = a;
			a = x;
			goto a;
		}
		if (b <= x) {
			c = b;
			b = x;
			goto a;
		}
		if (c <= x) {
			c = x;
			goto a;
		}
	a:;
	}
	cout << a << endl;
	cout << b << endl;
	cout << c << endl;
}

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

C++: // clang-format off
#include <bits/stdc++.h>
#define int long long
#define main signed main()
#define loop(i, a, n) for (int i = (a); i < (n); i++)
#define rep(i, n) loop(i, 0, n)
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define prec(n) fixed << setprecision(n)
#define stlice(from, to) substr(from, (to) - (from) + 1)
#define pb push_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
using namespace std;
using pii = pair<int, int>;
using vi = vector<int>;
using vd = vector<double>;
using vc = vector<char>;
using vb = vector<bool>;
using vs = vector<string>;
using vpii = vector<pii>;
using vvi = vector<vi>;
using vvb = vector<vb>;
using vvpii = vector<vpii>;
template<typename A> using fn = function<A>;
constexpr int INF = sizeof(int) == sizeof(long long) ? 1000000000000000000LL : 1000000000;
constexpr int MOD = 1000000007;
constexpr double PI = acos(-1);
template<typename A, typename B> bool cmin(A &a, const B &b) { return a > b ? (a = b, true) : false; }
template<typename A, typename B> bool cmax(A &a, const B &b) { return a < b ? (a = b, true) : false; }
constexpr bool odd(const int &n) { return n & 1; }
constexpr bool even(const int &n) { return !odd(n); }
void solve();
main { solve(); return 0; }
// clang-format on

void solve() {
  int W, H;
  while (cin >> W >> H, W) {
    vs v(H);
    rep(i, H) cin >> v[i];
    vvi dp(H, vi(W));
    int b = 0, w = 0;
    rep(i, H) rep(j, W) {
      dp[i][j] = 2 * (v[i][j] == 'B') + (v[i][j] == 'W');
      b -= v[i][j] == 'B';
      w -= v[i][j] == 'W';
    }
    rep(_, W * H) rep(i, H) rep(j, W) {
      if (v[i][j] != '.') continue;
      if (i > 0) dp[i][j] |= dp[i - 1][j];
      if (j > 0) dp[i][j] |= dp[i][j - 1];
      if (i < H - 1) dp[i][j] |= dp[i + 1][j];
      if (j < W - 1) dp[i][j] |= dp[i][j + 1];
    }
    rep(i, H) rep(j, W) {
      b += dp[i][j] == 2;
      w += dp[i][j] == 1;
    }
    cout << b << ' ' << w << endl;
  }
}

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

int main(){
	int i;
	int temp[10];

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

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

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

	return 0;
}

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

int main(){

  std::vector<unsigned int> heights;

  char buf[100];
  for (int i=0; i<10 ; i++){
    std::cin >> buf;
    heights.push_back(atoi(buf));
  }

  std::sort(heights.begin(),heights.end(),std::greater<int>());

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

  return 0;
}

C++: #include <iostream>

using namespace std;

int main() {

	int height[10];

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

	for (int i = 10 - 1; i >= 0; i--) {
		for (int j = 0; j < i; j++) {
			if (height[j] > height[j + 1]) {
				int dummy = height[j];
				height[j] = height[j + 1];
				height[j + 1] = dummy;
			}
		}
	}

	for (int i = 9; i >= 7; i--) {
		cout << height[i] << endl;
	}

	return 0;

}

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

typedef long long ll;

int main(void)
{
    priority_queue<ll> pque;
    ll input;

    for (int i = 0; i < 10; i++) {
        cin >> input;
        pque.push(input);
    }

    for (int i = 0; i < 3; i++) {
        cout << pque.top() << endl;
        pque.pop();
    }

    return 0;
}

C++: #include <iostream>

const int N = 10;

int main(void) {
  int a[N] = {0};

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

  int three = 3;

  for (int i = 0; i < N; i++) {
    for (int j = i + 1; j < N; j++) {
      if (a[j] > a[i]) {
	int tmp = a[i];
	a[i] = a[j];
	a[j] = tmp;
      }
    }
  }

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

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

using namespace std;

int main(void){
  int h;
  vector<int>hill;

  for(int i=0;i<10;i++){
    cin >> h;
    hill.push_back(h);
  }

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

  for(int i=0;i<3;i++)
    cout << hill[i] << endl;

  return 0;
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;
int main(void){
    // Here your code !
    int a[10];
    for(int i = 0; i<10; i++){
        scanf("%d\n", &(a[i]));
    }
    
    sort(a,a+10);
    printf("%d\n%d\n%d\n", a[9],a[8],a[7]);
}

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

int main(){

??????vector<int> data;

    for(int i=0;i<10;i++)
    {
       int input;
       cin>>input;
       data.push_back(input);
    }
    
    sort(data.begin,data.end,grater<int>());
    
    for(int i=0,i<3;i++)
    {
       cout<<data[i]<<endl;
    }

    return 0;
}

C++: #include <iostream>

int main()
{
    int highest = 0;//height_of_highest_mountain;
    int second = 0;//height_of_second_highest_mountain;
    int third = 0;//height_of_third_highest_mountain;
    int height;
    for (int i = 0;i < 10; i++) {
        std::cin >> height;

        if (height >= highest) {
            third = second;
            second = highest;
            highest = height;
            height = 0;
        } else if (height >= second) {
            third = second;
            second = height;
            height = 0;
        } else if (height >= third) {
            third = height;
            height = 0;
        }
    }

    std::cout << highest << std::endl;
    std::cout << second << std::endl;
    std::cout << third << std::endl;

    return 0;
}

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

void swap(int *a, int *b){
	int temp;
	temp = *a;
	*a = *b;
	*b = temp;
	
}

int main(){
	int arr[10];
	for(int i = 0; i < 10; i++){
		cin >> arr[i];
	}
	for(int i = 0; i < 10; i++)
		for(int j = 0; j < 10; j++)
			if(arr[i] < arr[j])
				swap(&arr[i], &arr[j]);
	cout << arr[9] << endl << arr[8] << endl << arr[7] << endl;
}

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

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

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

int main() {
	int m[10];
	for(int i=0; i<9; i++) cin >> m[i];
	sort(a, a+10);
	for(int i=9; i>6; i++) cout << m[i] << endl;

	return 0;
}

C++: #include<iostream>
#include<queue>
using namespace std;
int main ()
{
	priority_queue<int> q; int n;
	while (cin >> n) q.push (n);
	for (n = 3; n--;) cout << q.top() << endl, q.pop ();
}