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 <cstdio>

using namespace std;

int main(){
	int num, max;
	int list[100] = {0};
	
	max = 0;

	while (scanf("%d", &num) != EOF){
		list[num - 1]++;
	
		for (int i = 0; i < 100; i++){
			if (max < list[i]){
				max = list[i];
			}
		}
		for (int j = 0; j < 100; j++){
			if (max == list[j]){
				printf("%d\n", j + 1);
			}
		}
	}
	return 0;
}

C++: //0028 Mode Value
//1`100ÌlªÅå100ñ^¦çêé
//ÅplðoÍ¹æ@¡ÌÅplª éêÍA¬³¢ÉoÍ¹æ

#include<iostream>
#include<algorithm>
#include<limits>
using namespace std;

int main(void)
{
	const int N = 100;
	int a[N+1] = {};
	int i;
	while( cin >> i )
		a[i]++;

	int maxMode = numeric_limits<int>::min();
	for(i = 1; i <= N; i++)
		maxMode = max(maxMode, a[i]);
	for(i = 1; i <= N; i++)
	{
		if(a[i] == maxMode)
			cout << i << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <map>
using namespace std;
int main(){
	int n;
	map<int, int> cnt;
	int maxCnt = 0;
	while(cin >> n){
		cnt[n]++;
		maxCnt = max(maxCnt, cnt[n]);
	}
	for(map<int,int>::iterator itr = cnt.begin(); itr != cnt.end(); itr++){
		if(maxCnt == itr->second){
			cout << itr->first << endl;
		}
	}

	return 0;
}

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

using namespace std;

int main() {
  int n, mx = 0;
  map<int, int> m;
  while (cin >> n) ++m[n];
  for (auto i : m) mx = max(mx, i.second);
  for (auto i : m) {
    if (i.second == mx) cout << i.first << endl;
  }
}

C++: #include<cstdio>

using namespace std;

int main(void){
	int in[100],data[100],ans[100],cnt,work=0;
	int i,j;	//ループカウンタ

	for(i=0;i<100;i++)	ans[i]=0;
	for(i=0;i<100;i++)	in[i]=0;

	for(i=0;i<100;i++){
		if(scanf("%d",&data[i])==EOF)	break;	//EOF=Ctrl+z
		in[data[i]]++;
	}
	
	for(i=1;i<100;i++)
		if(in[work]<in[i])	work=i;
	
	ans[0]=work;
	cnt=0;
	for(i=1;i<100;i++){
		if(in[work]==in[i] && i!=work){
			cnt++;
			ans[cnt]=i;
		}
	}

	for(i=0;i<=cnt-1;i++){
		for(j=1;j<=cnt;j++){
			if(ans[i]>ans[j]){
				work=ans[i];
				ans[i]=ans[j];
				ans[j]=work;
			}
		}
	}
	
	for(i=0;i<=cnt;i++)
		printf("%d\n",ans[i]);

	return 0;
}

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

int main(){
	int a[110], i=1, b[110];
	vector<int> ans;
	for(int i=0 ; i<110 ; i++){
		b[i] = 0;
	}

	while(cin >> a[i]){
		if(i==100)break;

		b[ a[i] ]++;
	}
	int num = 0;
	for(int i=1 ; i<=100 ; i++){
		if( num < b[i] ){
			ans.clear();
			num = b[i];
			ans.push_back(i);
		}
		else if( num == b[i] ){
			ans.push_back(i);
		}
	}

	sort( ans.begin() , ans.end() );
	for(int i=0 ; i<ans.size() ; i++){
		cout << ans[i] << endl;
	}
	return 0;
}

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

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

C++: #include <iostream>
#include <map>
#include <algorithm>
#include <stdio.h>
#include <string.h>

using namespace std;

int ok, arr[100];

int main(void) {
    memset(arr, 0, sizeof(arr));
    while(~scanf("%d", &ok)) {
        arr[ok] += 1;
    }
    int mx = *max_element(arr, arr + 100);
    for(int i = 0; i < 100; i++) {
        if(arr[i] == mx) {
            printf("%d\n", i);
        }
    }
    return 0;
}

C++: #include <iostream>

using namespace std;

int main ( void )
{
	int x;
	unsigned int mx = 0, data[101] = { 0 };

	while (cin >> x)
	{
		++data[x];
		mx = max( mx, data[x] );
	}

	for (int i = 1; i < 101; ++i)
	{
		if (data[i] == mx)
			cout << i << endl;
	}

	return 0;
}

C++: #include<cstdio>
int main(void)
{
    int a,b=0,c=0,mode[100]={0};
    while(scanf("%d",&a)!=EOF)
    {
        mode[a-1]++;
        c++;
    }
    for(int i=0;i<c;i++)if(mode[i]>b)b=mode[i];
    for(int i=0;i<c;i++)if(mode[i]==b)printf("%d\n",i+1);
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int num[110] = {0};
  int max = 0;
  vector<int> maxnum;
  int n;
  while(cin>>n){
    num[n]++;
    if(num[n] > max){
      maxnum.clear();
      maxnum.pb(n);
      max = num[n];
    }else if(num[n] == max){
      maxnum.pb(n);
    }
  }
  sort(all(maxnum));
  rep(i,maxnum.size())cout<<maxnum[i]<<endl;

}

C++: #include <iostream>

using namespace std;

int main(void){

  int array[102];
  int n;
  for( int i = 0 ; i <= 101 ; i++ )array[i] = 0;

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

  int yano = 0;
  for( int i = 1 ; i <= 100 ; i++ ){
    yano = max( array[i] , yano );
  }

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

  return 0;
}

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

int i, n, max;
int m[101];

int main(void)
{
  memset(m,0,sizeof(m));
  while(scanf("%d",&n) == 1)
    m[n]++;

  max = 0;
  for(i = 1; i <= 100; i++)
     if (m[i] > max) max = m[i];

  for(i = 1; i <= 100; i++)
    if (m[i] == max) printf("%d\n",i);
  return 0;
}

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

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

C++: #include <iostream>
#include <algorithm>
#include <cstring>
using namespace std;
int main()
{
	int counter[200],m;
	memset(counter, 0, sizeof(counter));
	int i;
	while (cin >> i)
		counter[i]++;
	for (int i = 0; i < 200; i++)
		m = max(counter[i], m);
	for (int i = 0; i < 200; i++)
	{
		if (counter[i] == m)
			cout << i << endl;
	}
}

C++: #include <algorithm>
#include <bitset>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define FOR(x,a,b) for(int x=a;x<b;x++)
#define REP(x,b) for(int x=0;x<b;x++)
#define FORSIZE(x,A) for(int x=0;x<A.size();x++)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define SORT(x) sort(x.begin(),x.end())
#define RSORT(x) sort(x.rbegin(),x.rend())
#define rsort(x,n) sort(x, x+n, greater<int>())
#define REV(x) reverse(x.begin(),x.end())
using namespace std;
typedef long long ll;
inline int toInt(std::string s) {int v; std::istringstream sin(s);sin>>v;return v;}
template<class T> inline std::string toString(T x) {std::ostringstream sout;sout<<x;return sout.str();}

int main( int argc, const char* argv[] )
{
    int a[101];
    int tmp;
    int c = 0;
    int m = 0;
    fill(a, a+101, 0);
    while (cin >> tmp) {
        a[tmp] += 1;
        m = max(m, a[tmp]);
        c += 1;
    }
    FOR(i, 0, 101) {
        if (a[i] == m) {
            cout << i << endl;
        }
    }
    return 0;
}