Go: package main

import (
	"bufio"
	"os"
	"strconv"
	"fmt"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	table := make([]int, 100)
	now := 0
	max := 0
	for i := range table {
		table[i] = 0
	}
	for scanner.Scan() {
		now, _ =strconv.Atoi(scanner.Text())
		table[now-1]++
		if table[now-1] > max {
			max = table[now-1]
		}
	}
	for i := 0; i < 100; i++ {
		if table[i] == max {
			fmt.Println(i+1)
		}
	}
}

C++: //
//  main.cpp
//  kazane
//
//  Created by h3036136 on 2017/07/27.
//  Copyright ?? 2017??´ h3036136. All rights reserved.
//1=31,2=29,3=31,4=30,5=31,6=30,7=31,8=31,9=30,10=31,11=30,12=31

#include <iostream>
#include <string>
using namespace std;
int main(){
    int a[101]={0},b,i,saihin[100]={0},c=0,saidai=0;
    while(cin>>b){
        a[b]=a[b]+1;
    }
    for(i=1;i<=100;i++){
        if(saidai<a[i]){
            saidai=a[i];
        }
    }
    for(i=1;i<=100;i++){
        if(a[i]==saidai){
            saihin[c]=i;
            c=c+1;
        }
    }
    for(i=0;i<100;i++){
        if(saihin[i]==0)break;
        cout<<saihin[i]<<endl;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
    int a[100 + 1] = {0};
    int n;
    int Max = 0;
    while (cin >> n) {
        a[n]++;
        Max = Max < n ? n : Max;
    }
    int ans[100] = {0};
    int cnt = 0;
    int id[100] = {0};
    for (int i = 1; i <= Max; i++) { //~a[Max]
        if (ans[0] < a[i]) {
            ans[0] = a[i]; id[0] = i;
            for (int j = 1; j <= cnt; j++) {
                id[j] = 0;
            }
            cnt = 0;
        } else if (ans[0] == a[i]) {
            id[++cnt] = i;
        }
    }
    for (int i = 0; i < Max; i++) {
        if (id[i] != 0) {
            cout << id[i] << endl;
        }
        else break;
    }
    
}

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

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl;
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    vector<int> a(100);
    int n;
    while (cin >> n)
    {
        a[n]++;
    }

    int v = *max_element(ALL(a));

    rep(i, 100)
    {
        if (v == a[i])
        {
            OP(i)
        }
    }

    return 0;
}

C++: #include <iostream>
#include <fstream>
#include <sstream>
#include <iomanip> 
#include <complex> 
#include <string>
#include <vector> 
#include <list>
#include <deque> 
#include <stack> 
#include <queue> 
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <utility>
#include <algorithm> 
#include <numeric> 
#include <typeinfo> 
#include <cstdio>
#include <cstdlib> 
#include <cstring>
#include <cmath>
#include <climits> 
#include <ctime> 

using namespace std;

int main(void){
	int a;
	int maxa=0;
	vector<int> ans;
	map<int,int> f;
	for(a=0;a<=100;a++){
		f.insert( map<int,int>::value_type(a,0));
	}
	while(~scanf("%d",&a)){
		f[a]++;
	}
	for(a=0;a<=100;a++){
		maxa=max(maxa,f[a]);
	}
	for(a=0;a<=100;a++){
		if(maxa==f[a])ans.push_back(a);
	}
	sort(ans.begin(), ans.end());

	for(a=0;a<ans.size();a++){
		cout << ans[a] << endl;
	}
	return 0;
}

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

int data[101];
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

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

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

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

	return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int a[100]={0};
	int b[100][2]={0};
	int B1,B2;
	int i=0;
	for(int h=0;h<100;h++)
	{
		b[h][1]=h+1;
	}
while (cin>>a[i])
{
	b[a[i]-1][0]++;
	i++;
}
for(int j=0;j<i;j++)
{
	for(int k=j+1;k<i;k++)
	{
		if(b[k][0]>b[j][0])
		{
			B1=b[k][0];
			b[k][0]=b[j][0];
			b[j][0]=B1;
			B2=b[k][1];
			b[k][1]=b[j][1];
			b[j][1]=B2;
		}
	}
}
int l=0;
while(b[l][0]==b[0][0])
{
	cout<<b[l][1]<<endl;
	l++;
}
return 0;
}

C++: #include<iostream>
#include <string>
using namespace std;
int a[100];
int p,q=0;
int mode=100;
	int main(){
		for(int i=0;i<100;i++){
		cin>>p;
		if(a[p-1]<0){
			a[p-1]=1;}else{a[p-1]++;}}
		while(1){
			for(int ii=0;ii<100;ii++){
				if(a[ii]==mode){cout<<ii+1<<endl;
				q++;
				}}
			if(q>0){break;}else{mode--;}}
    return 0;
	}

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

int main(){
  int a,n;
  int my_array[101]={};
  
  
  while(cin>>a){
    my_array[a]++;
  }
  int b=0;
  for(n=1;n<=100;n++){
    if(b>my_array[n])
      b=my_array[n];
  }
  for(int c=0;c<=100;c++){
    if(b==my_array[c])
      cout<<c<<endl;
  }

C++: /*
	0028:Mode Value
*/
#include	<iostream>

using namespace std;

int max(int a, int b);

int main(void) {
	int ds[100] = {0};
	int nMode = 0;
	
	while(1) {
		int a;
		
		cin >> a;
		if( cin.eof() ) { break; }
		ds[a-1]++;
	}
	for(int i = 0; i < 100; i++) {
		nMode = max(nMode, ds[i]);
	}
	for(int i = 0; i < 100; i++) {
		if(nMode == ds[i]) {
			cout << i+1 << endl;
		}
	}
}

int max(int a, int b) {
	if(a > b) {
		return a;
	}
	return b;
}

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

int main() {
  vector<int> v;
  int temp;
  
  while(cin>>temp) v.push_back(temp);
  
  sort(v.begin(),v.end());
  
  int mx=0, cnt[101] = {};
  for(unsigned int i = 0; i < v.size(); i++) {
    mx = max(mx, ++cnt[v[i]]);
  }
  for(int i = 0; i < 101; i++) {
    if(mx == cnt[i]) cout << i << endl;
  }
  return 0;
}

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

int main(){
    int d[100];
    int maximize[100];

    int buf;
    while( scanf( "%d",&buf ) != EOF  ) d[buf-1]++;

    int buff = 0;
    for( int i = 0;i < 100;i++ ){
        if( d[i] > buff ) buff = d[i];
    }

    for( int i = 0;i < 100;i++ ){
        if( d[i] >= buff ) printf( "%d\n",i+1 );
    }
    return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
typedef pair<int,int> pint;
#define foreach(i,n) for(i=0;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define F first
#define S second
int dx[]={1,-1,0,0},dy[]={0,0,1,-1};

int main(){
	pair<int,int> a[101];
	rep(i,101){
		a[i].second=-i;
	}
	for(int k;cin>>k,k;){
		a[k].first++;
	}
	sort(a,a+101,greater<pair<int,int> >());
	for(int i=0;cout<<-a[i].second<<endl,a[i].F==a[i+1].F;i++);
	return 0;
}

C++: #include <iostream>

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

C++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#include <bits/stdc++.h>
using namespace std;
int main(){
  int x;
  int vec[100]={0};
  while(cin>>x){
    vec[x]++;
  }
  int ma=0;
  rep(i,100){
    ma = max(ma,vec[i]);
  }
  rep(i,100){
    if(vec[i]==ma) cout<<i<<endl;
  }
      
  return 0;
}

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

using namespace std;

int main(){
vector<int> data(101,0);
int v;
while(scanf("%d",&v)!=-1)data[v]++;
int mxvl=0;
vector<int> res;
for(int i=0;i<=100;++i){
if(mxvl < data[i]){
mxvl = data[i];
res.clear();
}
if(mxvl == data[i])res.push_back(i);
}
for(int i=0;i<res.size();++i)printf("%d\n",res[i]);
return 0;
}