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>
using namespace std;

#define rep(i,a,n) for(int i=a; i<n; i++)
#define repr(i,a,n) for(int i=a; i>=n; i--)
#define pb(a) push_back(a)
#define fr first
#define sc second
#define INF 999999999

#define X real()
#define Y imag()
#define EPS (1e-10)
#define EQ(a,b) (abs((a) - (b)) < EPS)
#define EQV(a,b) ( EQ((a).X, (b).X) && EQ((a).Y, (b).Y) )
#define LE(n, m) ((n) < (m) + EPS)
#define GE(n, m) ((n) + EPS > (m))

typedef vector<int> VI;
typedef vector<VI> MAT;
typedef pair<int, int> pii;
typedef long long int ll;

typedef complex<double> P;
typedef pair<P, P> L;
typedef pair<P, double> C;

int const MOD = 1000000007;

int main() {
    int a[110];
    memset(a, 0, sizeof(a));
    int n;
    int m_num = 0;
    while(cin >> n) {
        // if(n == 0) break;
        a[n]++;
        m_num = max(m_num, a[n]);
    }

    rep(i,1,101) {
        if(a[i] == m_num) cout << i << endl;
    }

    return 0;
}

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

int main() {
	vector<int> v(100, 0); int temp;
	while (cin >> temp) v[temp - 1]++;
	temp = *max_element(v.begin(), v.end());
	for (int i = 0; i < 100; i++) if (v[i] == temp) cout << i + 1 << endl;
	return 0;
}

C++: #include <iostream>
#include <math.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<algorithm>

using namespace std;

int main(){
  int input=0;
  int a[100];
  int b[100][2];
  for(int i=0;i<100;i++){
    for(int j=0;j<2;j++){
      b[i][j]=0;
    }
  }
  int n=0;
  while(cin>>input){
    a[n]=input;
    n++;
  }
  sort(a,a+n);
  int i=0,j=0;
  for(i=0;i<n;i++){
    if(i==0){
      b[0][0]=a[0];
      b[0][1]++;
    }
    else if(b[j][2]==a[i]){
      b[j][1]++;
    }
    else{
      b[++j][0]=a[i];
      b[j][1]++;
    }
  }
  int max=b[0][1];
  for(int k=0;k<=j;k++){
    if(max<b[k][1]){
      max=b[k][1];
    }
  }
  int out[100];
  int m=0;
  for(int k=0;k<=j;k++){
    if(max==b[k][1]){
      out[m]=b[k][0];
      m++;
    }
  }
  for(int p=0;p<m;p++){
    cout<<out[p]<<"\n";
  }
  return 0;
}

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

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

C++: #define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>

typedef long long ll;
using namespace std;

typedef pair<int,int> P;

int main()
{

	int a;
	map<int,int> num;
	queue<int> que;
	while(~scanf("%d",&a)){
		num[a]++;
	}

	int max_freq = -1;

	for(map<int,int>::iterator it; it != num.end(); it++){
		if(it->second == max_freq){
			que.push(it->first);
		}
		else if(it->second > max_freq){
			while(!que.empty()){
				que.pop();
			}
			max_freq = it->second;
			que.push(it->first);
		}
		
	}

	while(que.empty()){
		cout << que.front() << endl;
		que.pop();
	}

}

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;
}

C++: #include <stdio.h>

#define EOF (-1)

int main(void)
{
	int number[100];
	int i=0;
	int judge_eof;
	int qty;
	int count[100];
	
	//count???0??§?????????
	for(i=0;i<100;i++)
	{
		count[i] = 0;
	}
	
	for(i=0;i<100;i++)
	{
		judge_eof = scanf("%d",&number[i]);
		
		i++;
		
		if(judge_eof == EOF)
		{
			goto OUT;
			qty = i;
		}
	}
	
	OUT:
	
	for(i=0;i<qty;i++)
	{
		count[number[i]]++;
	}
	
	return 0;
}

C++: #include<iostream>

using namespace std;

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

C++: #include<iostream>
#include<map>
using namespace std;
 
int main(int argc, char* argv[]) {
  map<int, int> data;
  int var;
  int max = 0;
  while(cin >> var) {
    data[var]++;
    if(data[var] > max) {
      max = data[var];
    }
  }
  //cout << max << endl;
  for(map<int, int>::iterator it=data.begin(); it!=data.end(); it++) {
    if(it->second == max) cout << it->first << endl;
  }
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
using namespace std;
int main() {
	int t[100] = {};
	int i = 0;
	vector<int>a;
	while (cin >> i) {
		t[i]++;
	}
	int m = 0;
	for (int i = 0; i < 100; i++) {
		m = max(t[i], m);
	}
	for (int i = 0; i < 100; i++) {
		if (t[i] == m) {
			a.push_back(t[i]);
		}
	}
	sort(a.begin(), a.end());
	for (int i = 0; i < a.size(); i++) {
		cout << a[i] << endl;
	}
}

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

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

  int maxa = 0;
  while (true) {
    int maxb = maxa;
    maxa = 0;

    int max_val = 0;
    for (int i = 0; i < 100; i++) {
      if (a[i] > maxa) {
        maxa = a[i];
        max_val = i + 1;
      }
    }
    if (maxa < maxb) break;

    cout << max_val << endl;
    a[max_val - 1] = 0;
  }

  return 0;
}

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

int cnt[101];

int main(){
	int i;
	while( ~scanf("%d",&i) ){
		cnt[i]++;
	}
	
	int mmax = 0;
	//データ数を求める
	for( i = 0;i < 101;i++ ){
		mmax = max( mmax, cnt[i] );
	}
	
	//最頻値を探す( データ数と照らし合わせる )
	for( i = 0;i < 101;i++ ){
		if( cnt[i] == mmax ){
			printf("%d\n",i );
		}
	}
	return 0;
}

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

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <map>
#include <numeric>
using namespace std;

#define FOR(i,a,b) for(long long int i=(a);i<(b);i++)
#define REP(i,n) for(long long int i=0;i<(n);i++)
#define ALL(s) (s).begin(),(s).end()

#define PI 3.14159265358479

typedef long long ll;
typedef vector<long long int> vi;
typedef vector<long long int>::iterator vit;

int main(){
	int n,c = 0;
	int a[110] = {};
	while (cin >> n){
		a[n]++;
		if (c < a[n]){
			c++;
		}
	}
	REP(i, 100){
		if (a[i] == c){
			cout << i << "\n";
		}
	}
}