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++: //↓template↓

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
long long fac[200005], finv[200005], inv[200005];
vector<long long>dij;
struct edge { long long to, cost; };
vector<vector<edge> >G;

long long mod_pow(long long a, long long b) {
	long long res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}

	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

//↑template↑


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

C++: #include <bits/stdc++.h>
using namespace std;
int cnt[101];

int main() {
  int v;
  while (cin >> v) {
    cnt[v]++;
  }
  int maxv = 0;
  for (int i = 1; i <= 100; i++) {
    maxv = max(maxv, cnt[i]);
  }
  for (int i = 1; i <= 100; i++) {
    if (cnt[i] == maxv) {
      cout << i << "\n";
    }
  }
}

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

using namespace std;

int main(){
	int ary[100];
	int hikaku[100];
	int n;
	int a = 0;
	
	for(int i = 1; i <= 100; i++){
		ary[i] = i;
		hikaku[i] = 0;
	}
//scanf("%d",&n) != EOF

	while(cin >> n){

		for(int i = 1; i <= 100; i++){

			if(ary[i] == n){
				hikaku[i]++;
				a = max(a,hikaku[i]);
			}
		}

	}

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

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
  #define MMM 100
  int num_count[MMM] = {0};
  int num;
  int mode_value=0;

  while(cin >> num){
    num_count[num]++;
    if(num_count[num] > mode_value){
      mode_value++;
    }
  }
  
  for(int i=0;i<MMM;i++){
    if(num_count[i] == mode_value){
      cout << i << endl;
    }
  }
}

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

int main() {
  vector<int> v;
  int temp;
  
  while(cin>>temp) v.push_back(temp);
  int mx=0, cnt[101] = {};
  for(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 <bits/stdc++.h>
using namespace std;

#define iota(i,n,b,s) for(int i=int(b);i!=int((b)+(s)*(n));i+=(s))
#define range(i,n,m) iota(i,(((n)>(m))?((n)-(m)):((m)-(n))),(n),((n)>(m)?-1:1))
#define rep(i,n) iota(i,(n),0,1)
#define loop for(;;)

#define INF (1e9)
#define EPS (1e-9)
#define cons(a,b) (make_pair(a,b))
#define car(a) (a.first)
#define cdr(a) (a.second)
#define cadr(a) (car(cdr(a)))
#define cddr(a) (cdr(cdr(a)))
#define all(a) a.begin(), a.end()
#define trace(var) cerr<<">>> "<<#var<<" = "<<var<<endl;

typedef long long Integer;
typedef double Real;
typedef vector<int> vi;
typedef vector<string> vs;
typedef map<string,int> Dictionary;
const Real PI = acos(-1);

template<class S, class T>
ostream& operator<<(ostream& os, pair<S,T> p) {
  os << '(' << car(p) << ", " << cdr(p) << ')';
  return os;
}

template<class T>
ostream& operator<<(ostream& os, vector<T> v) {
  if (v.size() == 0) {
    os << "(empty)";
    return os;
  }
  os << v[0];
  for (int i=1, len=v.size(); i<len; ++i) os << ' ' << v[i];
  return os;
}

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

int main() {

  int a[101] = {0};
  int ac = 0;

  for (int x; cin >> x, cin;) {
    a[x]++;
    ac = max(ac, a[x]);
  }

  for (int i = 1; i < 101; ++i)
    if (ac == a[i])
      cout << i << endl;

  return 0;
}

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

int main(){
    int f[101], n, max = 0;
    fill(f, f+101, 0);
    while( scanf(" %d", &n) != EOF ){
        f[n]++;
        if( f[n] > max ) max = f[n];
    }
    for(int i = 1;i < 101; i++){
        if( f[i] == max ) printf("%d\n", i);
    }
    return 0;
}

C++: //#define _GRIBCXX_DEBUG
#include <algorithm>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <iomanip>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;


// ?????¬???????????¬??????
#pragma region MACRO
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define PED cout << "\n"
#define rep(i,n) for(int i=0; i<(int)n; ++i)
#define REP(i,x,n) for(int i=x; i<(int)n; ++i)
#define repi(i,n) for(int i=0; i<=(int)n; ++i)
#define REPI(i,x,n) for(int i=x; i<=(int)n; ++i)
#define ILP while(true)
#define FOR(i,c) for(__typeof((c).begin())!=(c).begin(); i!=(c).end(); ++i)
#define ALL(c) (c).begin(), (c).end()
#define mp make_pair
#pragma endregion

// ???
#pragma region TYPE_DEF
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<string, string> pss;
typedef pair<string, int> psi;
typedef pair<int, string> pis;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long> vl;
typedef vector<long long> vll;
typedef vector<string> vs;
#pragma endregion

// Effective std
#pragma region ESTD
template<typename C, typename T>
constexpr int count(C& c, T t) { return count(ALL(c), t); }
template<typename C, typename F>
constexpr int count_if(C& c, F f) { return count_if(ALL(c), f); }
template<typename C, typename T>
void erase(C& c, T t) { remove(ALL(c), t), c.end(); }
template<typename C>
void remove(vector<C>& c, unsigned int index) { c.erase(c.begin()+index); }
template<typename C, typename T, typename U>
constexpr void replace(C& c, T t, U u) { replace(ALL(c), t, u); }
template<typename C, typename F, typename U>
constexpr void replace_if(C& c, F f, U u) { (ALL(c), f, u); }
template<typename C>
constexpr void reverse(C& c) { reverse(ALL(c)); }
template<typename C>
constexpr void sort(C& c) { sort(ALL(c)); }
template<typename C, typename Pred>
constexpr void sort(C& c, Pred p) { sort(ALL(c), p); }
#pragma endregion

// ?????°
#pragma region CONST_VAL
#define PI (2*acos(0.0))
#define EPS (1e-9)
#define MOD (int)(1e9+7)
#pragma endregion


int main()
{
    vi v(101,0);
    int a;
    while(cin>>a) {
        v[a]++;
    }
    vi v2 = v;
    sort(v);

    rep(i,v2.size()) {
        if(v2[i]==v[100]) P(i);
    }
    return 0;
}

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

int main(){
  int n,i,max=0;
  int data[101];

  for(i=0;i<=100;i++){
    data[i]=0;
  }
  
  while(scanf("%d",&n)!=EOF){
    data[n]++;
  }
  
  for(i=1;i<=100;i++){
    if(max<data[i]){
      max=data[i];
    }
  }

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

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

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

C++: #include <iostream>

using namespace std;

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