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<iostream>
#include<algorithm>
using namespace std;
int t[101],n,maxm;
int main(){
  for(int i=0;i<101;i++)t[i]=0;
  maxm=0;
  while(cin>>n){
    t[n]++;
    maxm=max(maxm,t[n]);
  }
  for(int i=1;i<=100;i++){
    if(maxm==t[i])cout<<i<<endl;
  }
  return 0;
}

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

using namespace std;

int main()
{
	int num[101] = {0};
	int data, max = -1;
	vector<int> mode;

	while (cin >> data)
	{
		if(cin.eof())	break;

		num[data]++;
	}

	for (int i=1; i<101; i++)
	{
		if(num[i] > max){
			max = num[i];
			mode.clear();
			mode.push_back(i);
		}
		else if(num[i] == max){
			mode.push_back(i);
		}
	}

	vector<int>::iterator numit = mode.begin();
	for (;numit != mode.end(); numit++)
	{
		cout << *numit << endl;
	}

	return 0;
}

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

int map[101];

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

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

int main() {
	int n,max=0,map[101]={0};
	while (scanf("%d",&n) != EOF)
	{
		map[n]++;
		if (max < map[n])max=map[n];
	}
	for (int i=1; i<101; i++)
	{
		if (map[i]==max)cout << i << endl;
	}
	return 0;
}

C++: #include <iostream>
#define NUM 10000


using namespace std;

int main(void){
	int times[NUM];
	int i, n;
	int max;

	for(i=0;i<NUM;i++){
		times[i] = 0;
	}

	while(cin >> n){
		times[n]++;
	}

	max = 0;
	for(i=0;i<NUM;i++){
		if(max < times[i]){
			max = times[i];
		}
	}

	for(i=0;i<NUM;i++){
		if(max == times[i]){
			cout << i << endl;
		}
	}
	return 0;
}

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

typedef long long ll;
typedef pair<int, int> P;

#define all(c) (c).begin(), (c).end()
#define pb push_back
#define mp make_pair
#define EXIST(v,i) (find(all(v), i) != (v).end())
#define ERASE(v,i) (v).erase(remove(all(v), i), (v).end())
#define INDEX(v,i) (find(all(v), i) - (v).begin())
#define rep(i,n) for(int i = 0; i < (int)n; ++i)
#define debug(x) cerr << #x << " = " << (x) << endl;

inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

const int INF = 100000000;
const double PI = 3.14159265358979323846;
const double EPS = 1e-10;

int main() {
	vector<int> arr(101);
	for(int p; cin >> p;) arr[p]++;
	int most = *max_element(all(arr));
	rep(i, 101) {
		if(arr[i] == most)
			cout << i << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int n;
  int d[102]={0};
  int max=0;
  while(cin>>n){
    d[n]++;
    if(max<d[n]){
      max=d[n];
    }
  }
  if(max!=0){
    for(int i=0;i<101;i++){
      if(d[i]==max){
	cout<<i<<endl;
      }
    }
  }
  return 0;
}

C++: //https://onlinejudge.u-aizu.ac.jp/challenges/sources/PCK/Prelim/0028?year=2004

#include <bits/stdc++.h>

using namespace std;

int main() {
    int a;
    map<int, int> mp;

    int mx = 0;
    while (cin >> a) {
        mp[a]++;
        mx = max(mx, mp[a]);
    }

    for (auto m : mp) {
        if (m.second == mx) {
            cout << m.first << endl;
        }
    }
    return 0;
}

/*
 *
 */

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

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

C++: #include <stdio.h>

int main(void){
	int n[100];
	int a = 0;
	int m = 0;
	for(int i=0;i<100;++i){
		n[i] = 0;
	}
	while(scanf("%d", &a) != EOF){
		n[a-1]++;
	}
	for(int i=0; i<100; ++i){
		if(m < n[i]){
			m = n[i];
		}
	}
	for(int i=0; i<100; ++i){
		if(n[i] == m){
			printf("%d\n", i+1);
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
  
int main(){
 
int numbers[100] , x ,y, i;
 
while ( cin >> x ){
numbers[x - 1]++;
}
 
y = 0;
for( i = 0 ; i < 100 ; i++ ){
     if (numbers[i] > y){
      y = numbers[i];
    }
}
 
for ( i = 0 ; i < 100 ; i++ ) {
     if ( y == numbers[i] ){
       cout << i + 1 << endl;
      }
}
 
return 0;
}

C++: #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };

int main() {
	int a[100] = { 0 };
	int n;
	while (cin >> n)
		a[n - 1]++;

	int ma = 0;
	REP(i, 100){
		ma = max(ma, a[i]);
	}
	REP(i, 100){
		if (a[i] == ma)
			cout << (a[i] + 1) << endl;
	}
	return 0;
}

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

#define SIZE 300005
#define MOD 1000000007LL
#define INF INT_MAX / 3
#define LLINF 1LL << 60
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,a,b) for(int i=a;i<=b;i++)
#define DOWN(i,b,a) for(int i=b;i>=a;i--)
#define SET(a,c) memset(a,c,sizeof a)
#define FORALL(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define FOREACH(i,c) for(auto (i) : (c))
#define BIT(i,j) ((i)>>(j))&1
#define ALL(o) (o).begin(), (o).end()
#define ERASE(o) (o).erase(unique((o).begin(),(o).end()), (o).end())
#define SQ(x) ((x)*(x))
using namespace std;
typedef long long ll;
typedef valarray<int> Array;
typedef pair<ll,ll> Pll;
typedef pair<int, int> Pii;
typedef pair<double, double> Pdd;
template<typename T> inline void priv(vector<T>a){REP(i,a.size()){cout<<a[i];if(i==a.size()-1)cout<<endl;else cout<<" ";}}
int gcd(int a,int b){int c=max(a,b);int d=min(a,b);return c==0||d==0?c:gcd(c%d,d);}
int lcm(int a,int b){return a==0||b==0?0:a*b/gcd(a,b);}

int main()
{
  vector<int> a(101,0);
  int x, tmp=0;
  while(~scanf("%d",&x)) a[x]++;
  vector<int> ans;
  FOR(i,1,100)
  {
    if(a[i] > a[tmp])
    {
      tmp = i;
      ans.clear();
      ans.push_back(tmp);
    }
    else if(a[i] == tmp)
      ans.push_back(i);
  }
  for(auto v : ans) printf("%d\n",v);
  return 0;
}

C++: #include <iostream>

using namespace std;

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

    int n;
    while (cin >> n) {
        a[n-1] += 1;
    }

    int ma = 0;

    for (int i = 0; i < 100; ++i) if (ma < a[i]) ma = a[i];

    for (int i = 0; i < 100; ++i) if (a[i] == ma) cout << i + 1 << endl;
}