Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	var max int

	numbers := map[int]int{}
	for {
		var a int
		_, err := fmt.Scan(&a)
		if err != nil {
			break
		}
		numbers[a]++
		if numbers[a] >= max {
			max = numbers[a]
		}
	}

	var modes []int
	for a, b := range numbers {
		if b == max {
			modes = append(modes, a)
		}
	}

	sort.Ints(modes)
	for _, mode := range modes {
		fmt.Println(mode)
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
	int a[101]={},b;
	while(cin>>b){
		if(b==0)break;
		a[b]++;
	}
	b=0;
	for(int i=1;i<=100;i++){
		if(b<a[i]){
			b=a[i];
		}
	}
	for(int i=1;i<=100;i++){
		if(b==a[i]){
			cout<<i<<endl;
		}
	}
	return 0;
}

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

using namespace std;

int main(){
	int a[101] = {0};
	int b;
	int MAX = 0;
	int i=0;

	while(cin >> b){
		a[b]++;
	}
	for(int j=1; j<101; i++){
		MAX = max(MAX, a[j]);
	}
	for(int m=1; m<101; m++){
		if(MAX == a[m]){
			cout << m << endl;
 		}
	}
	return 0;
}

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

int main() {
	vector<int> array, num(101, 0), out;
	int inp, MAX = 0;
	int flag = 0;
	
	while (cin >> inp) {
		array.push_back(inp);
	}

	for (int i = 0; i < array.size(); i++) {
		MAX = max(++num[array[i]], MAX);		
	}

	for (int i = 1; i < num.size(); i++) {
		if (MAX == num[i])cout << i << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
using namespace std;
int sum[101],n,mx;
int main(){
    while(cin>>n){
        sum[n]++;
    }
    for(int i=0;i<100;i++)mx=max(mx,sum[i]);
    for(int i=0;i<100;i++){
        if(mx==sum[i])cout<<i<<" ";
    }
    cout<<endl;
return 0;
}

C++: #include<iostream>
#include<cmath>
#define rep(i,a) for(int i=0;i<a;i++)
using namespace std;

int main(){
	int num[101]={0};
	int a,maxin=0;
	while(cin>>a){
		num[a]++;
		maxin=max(maxin,num[a]);
	}
	rep(i,101){
		if(num[i]==maxin)cout<<i<<endl;
	}
	return 0;
}

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

using namespace std;

int main() {
    int n, a[100] = { 0 }, maxv = 0;
    while (cin >> n) {
        a[n - 1]++;
        maxv = max(maxv, a[n - 1]);
    }
    for (int i = 0; i < 100; i++) {
        if (a[i] == maxv) {
            cout << i + 1 << endl;
        }
    }

    return 0;
}

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

int main(){

int numbers[100] , x ,y;

while ( cin >> x ){
numbers[x - 1]++;
}

return 0;
}

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

int main(){
	int most, n;
	int array[101];
	while(cin >> n){
		array[n]++;
	}
		for(int i=1; i<=100; i++){
			most = max(array[i], most);
		}
		for(int i=1; i<=100; i++){
			if(array[i] == most){
				cout << array[i] << endl;
			}
		}
	return 0;
}

C++: #include <cstdio>

using namespace std;

int main() {
    int n[101]={};

    int mode=0;
    while (true) {
        int a;
        if (scanf("%d", &a) == EOF)
            break;

        ++n[a];
        if (mode < n[a])
            mode = n[a];
    }

    for (size_t i=1; i<=100; ++i)
        if (n[i] == mode)
            printf("%zd\n", i);

    return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int n,max=0;
	int in[10]={0};
	while(cin>>n){
		in[n]++;
		if(max<in[n])max=in[n];
	}
	for(int i=0;i<10;i++){
	
		if(max==in[i])cout<<i<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<complex>
#include<iomanip>
 
#define EPS (1e-10)
using namespace std;
#define PI (3.1415926535)

int main(){
	int num[101] = {0};

	int n, max = -1;
	while(cin >> n){
		num[n]++;
		if(num[n] > max){
			max = num[n];
		}
	}

	for(int i = 1; i <= 100; i++){
		if(num[i] == max){
			cout << i << endl;
		}
	}


	return 0;
}

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

int main(){
	int n, i;
	int h[200];
	int most = 0;
	while(cin >> n){
		h[n]++;
		if (most < h[n]) {
			most = h[n];
		}
	}
	for (i = 1; i <= 100; i++) {
		if (h[i] == most) {
			cout << i << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int data_count[100]={0},num,max_count=0,p=0;
  while(scanf("%d",&num)!=EOF){
    data_count[num-1]++;
    p++;
  }
  for(int i=0;i<p;i++){
    if(max_count<data_count[i])max_count=data_count[i];
  }
  for(int i=0;i<p;i++){
    if(max_count==data_count[i]){
      cout<<i+1<<endl;
    }
  }
}

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

int main() {
	vector<int> array, num(101, 0), out;
	int inp, MAX = 0;
	int flag = 0;
	
	while (cin>>inp)
	{
		array.push_back(inp);
	}
	for (int i = 0; i < array.size(); i++)
	{
		int cnt = 0;
		for (int j = i; j < array.size(); j++)
		{
			if (array[i] == array[j])num[i]++;
		}
	}

	for (int i = 0; i < array.size(); i++)
	{
		for (int j = 0; j < array.size(); j++)
		{
			if (num[i] < num[j]) {
				flag = 1;
				break;
			}
		}
		if (flag != 1) out.push_back(array[i]);		
		flag = 0;
	}
	sort(out.begin(), out.end());
	for (int i = 0; i < out.size(); i++)
	{
		cout << out[i] << endl;
	}
	return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <array>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <utility>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <bitset>
#include <random>
#include <functional>
#include <sstream>
#include <iomanip>

using namespace std;

#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back

typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef long long LL;

int main() {
	int x;
	VI cnt(109);
	while (cin >> x) {
		//if (x == 0)break;
		cnt[x]++;
	}
	int max = *max_element(all(cnt));
	FOR(i, 1, 101) {
		if (cnt[i] == max)cout << i << endl;
	}
}

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

int main(void){
    int a,tmp=-1,count=0;
    std::deque<int> deq;
    deque<int> mode;
    while (cin>>a) {
        deq.emplace_back(a);
    }
    for (int i=0;i<deq.size();i++) {
        for (int j=i+1;j<deq.size();j++) {
            if (deq[i]==deq[j]) {
                count++;
            }
        }
        if (tmp<count) {
            mode.clear();
            tmp=count;
            mode.emplace_back(deq[i]);
        } else if (tmp==count) {
            mode.emplace_back(deq[i]);
        }
        count=0;
    }
    sort(mode.begin(),mode.end());
    for (int k=0;k<mode.size();k++) {
        cout<<mode[k]<<endl;
    }
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
using namespace std;

typedef istringstream ISS;
typedef ostringstream OSS;
typedef vector <string> VS;
typedef vector <int> VI;
typedef vector <VI> VVI;
template <class T> T gcd( T a, T b ) { return !b ? a : gcd( b, a % b ); }
template <class T> T lcm( T a, T b ){ return a / gcd( a, b ) * b; }
template <class T> string print_v( vector<T> v ) { OSS oss; for ( typename vector<T>::iterator it_i = v.begin(); it_i != v.end(); ++ it_i ) { oss << *it_i << ", "; } return oss.str(); }

int main() {
    int D[101] = {};
    int a;
    int max_d = 0;
    while ( cin >> a ) max_d = max( max_d, ++D[a] );
    for ( int i = 1; i <= 100; ++ i ) {
        if ( D[i] == max_d ) cout << i << endl;
    }
    return 0;
}