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++: #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>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <set>
#include <map>
#include <algorithm>
#include <cassert>

using namespace std;


bool solve(){
	vector<vector<int> > a(100, vector<int>(2, 0));
	for(int i=0;i<100;i++){
		a[i][0] = i;
	}
	int n;
	while(cin>>n){
		a[n-1][1]++;
	}
	for(int i=0;i<100-1;i++){
		for(int j=i;j<100;j++){
			if(a[i][1] < a[j][1]){
				swap(a[i][0],a[j][0]);
				swap(a[i][1],a[j][1]);
			}
		}
	}
	int hoge=0;
	while(1){
		cout<< a[hoge][0]+1<< endl;
		if(a[hoge][1]!=a[hoge+1][1] || hoge==99) break;
		hoge++;
	}
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

C++: #include <stdio.h>

int main()
{
	int val[101] = {0}, val2[100], v, i, max;

	i = 0;
	while(scanf("%d", &v) != EOF){
		val[v]++;

		i++;
	}

	max = 1;
	v = 0;
	for(i = 1; i < 101; i++){
		if(max == val[i]) {v++; val2[v] = i;}
		else if(max < val[i]) {max = val[i]; v = 0; val2[v] = i;}
	}

	i = 0;
	while(val2[i] != '\0'){
		printf("%d\n", val2[i]);

		i++;
	}

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
/*
int main(void){
    int a[101],b,res=0;
    for(int i=0;i<101;i++)a[i]=0;
    for(int i=0;i<101;i++){
        b=0;
        cin>>b;
        a[b]++;
    }
    int ans[101],j=0;
    for(int i=0;i<101;i++)ans[i]=0;
    for(int i=1;i<101;i++){
        if(a[i]>=res){
            ans[j]=a[i];
            j++;
        }
    }
    for(int i=0;i<101;i++){
        cout<<ans[i]<<endl;
        if(ans[i]==0)break;
    }
}
*/
int main(void){
    int n,i=0;
    int a[101] ;
    memset(a,0,sizeof(a));
    while(cin>>n){
        a[n]++;
        i++;
    }
    int max = 0;

    for(int j = 0;j<i;j++){
        if(a[j] > max)max = a[j];
    }
    
    for(int j=0;j<i;j++){
        if(a[j] == max){
            cout << j<<endl;
        }
    }
    
}

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

C++: #include<iostream>

using namespace std;

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

	return 0;
}

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


int main(int argc, char *argv[])
{
  int x;
  vector<int> freq;
  int X[120] ={0};
  while(cin >>x){
    freq.push_back(x);
}
    int maxf = 0;
  for(int i = 0;i < freq.size();i++){
    X[freq[i]]++;
      maxf = max(maxf,X[freq[i]]);
    }
  for(int j = 0;j < 100;j++){
    if(X[j] == maxf){
      cout << j << endl;
    }
  }
  
  return 0;
}

C++: 
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int a[10000]={0};
int s,sai,ans=0,c=0,i;
while(cin>>s){
a[s]++;
c++;
}
for(i=0;i<c;i++){
if(a[i]>ans){
ans=a[i];
sai=i;
}
cout<<sai<<endl<<ans<<endl;
return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int n;
  int k=0;
  int a[101]={0};
  while(scanf("%d",&n)!=EOF){
    a[n]++;
  }
  for(int i=0;i<101;i++){
    if(k<a[i]){
      k=a[i];
    }
  }
  for(int i=0;i<101;i++){
    if(k==a[i]){
      printf("%d\n",i);
    }
  }
  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;){
		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>
#include <algorithm>
#include <functional>
#include <vector>
#include <map>
using namespace std;

int main(){
  int n,x;
  map<int,int>m;
  for(;cin>>x;m[x]++);
  vector<pair<int,int> >v;
  for(map<int,int>::iterator it=m.begin();it!=m.end();it++)v.push_back(make_pair((*it).second,(*it).first));
  sort(v.begin(),v.end(),greater<pair<int,int> >());
  vector<int>w;
  for(n=v[0].first,x=0;v[x].first==n;x++)w.push_back(v[x].second);
  sort(w.begin(),w.end());
  for(n=0;n<w.size();n++)cout<<w[n]<<endl;
}

C++: #include<iostream>

int data[101];

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

C++: #include<iostream>
#include<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
	int n;
	int a[101]={0};

	while(cin>>n){
        a[n]++;

	}
	int b=0;
    for(int i=0;i<100;i++){
        b=max(a[i],b);

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

    }

	return 0;
}

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

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
using namespace std;
typedef pair<int ,int > P;
typedef long long ll;

int ary[105];
int main() {
    int a;
    while(cin>>a) {
        ary[a]++;
    }
    int maxi = *max_element(ary,ary+105);
    rep(i,105) {
        if(maxi==ary[i]) {
            cout<<i<<endl;
        }
    }
    return 0;
}