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 REP(i,num) for(int i=0;i<(num);++i)
#define ALL(c) c.begin(),c.end()
#define PRINTALL(c) for(auto& x:c){cout<<x<<' ';}cout<<endl;
#define PAIRCOMP(c,comp) [](const pair<ll,ll>& lhs,const pair<ll,ll>& rhs){return lhs.c comp rhs.c;}

using namespace std;
using ll = long long;

constexpr ll atcoder_mod = 1e9+7;

template<typename T=int>
T in(){T x; cin >> x; return (x);}
template<typename T=int,typename C=vector<T>>
C vecin(int N){C x(N);REP(i,N){x[i]=in<T>();}return move(x);}

void vout(){cout << endl;}
template<typename Head,typename... Tail>
void vout(Head&& h,Tail&&... t){cout << ' ' << h;vout(forward<Tail>(t)...);}
void out(){cout << endl;}
template<typename Head,typename... Tail>
void out(Head&& h,Tail&&... t){cout << h;vout(forward<Tail>(t)...);}

int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);

	vector<pair<int,int>> A(100);
	REP(i,100){
		A[i].first = i+1;
		A[i].second = 0;
	}
	int v;
	while(cin>>v){
		A[v-1].second++;
	}
	sort(ALL(A),[](pair<int,int>& l,pair<int,int>& r){return l.second==r.second ? l.first<r.first : l.second>r.second;});
	int M=A[0].second;
	for(int i=0;i<100;i++){
		if(A[i].second!=M) break;
		out(A[i].first);
	}
	return 0;
}

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

using namespace std;

/*-------------------------------*/
#define FOR(i, a, b) for(int i = (a); i < (b); i++)  //a~(b - 1)?????§
#define print(i) cout << i << endl //?°??????????Python?????????
#define all(i) (i).begin(),(i).end() //??¨??????(sort??¨???)
#define mp make_pair //mp(OO, OO)??¨???:::pint??¨???

typedef long long ll;
typedef pair<int, int> pint;
typedef vector<int> vi;
typedef vector<vector<int> > vii;
typedef vector<long long> llv;
typedef vector<pint> vpint;
/*-------------------------------*/

int main(void)
{
  int a[101] = {};
  int mx = 0;
  int x;

  while (scanf("%d", &x) != EOF){
    a[x]++;
    if (mx < a[x]) mx = a[x];
  }
  FOR(i, 1, 101){
    if (a[i] == mx){
      cout << i << endl;
    }
  }
  return 0; 
}

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

C++: #include<iostream>
int main(){int l[999],i,f;for(i=0;i<999;i++)l[i]=0;while(std::cin>>i)l[i-1]++;for(i=0,f=0;i<999;i++)if(f<l[i])f=l[i];for(i=0;i<999;i++)if(l[i]==f)std::cout<<i+1<<"\n";}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
using namespace std;
typedef long long int ll;

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	map<int,int> mp;
	int a;
	while(cin >> a){
		mp[a]++;
	}
	int ma=0;
	for(auto p:mp){
		ma=max(p.second,ma);
	}
	for(auto p:mp){
		if(ma==p.second){
			cout << p.first << endl;
		}
	}
}

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

int main(void){
	int n;
	int x[101];
	for(int i=0; i<101; i++)
		x[i] = 0;

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

	vector<int> res;
	int max = 0;

	for(int i=1; i<101; i++){
		if(x[i] > max){
			max = x[i];
			res.clear();
			res.push_back(i);
		}else if(x[i] == max){
			res.push_back(i);
		}
	}

	for(int i=0; i<res.size(); i++){
		cout << res[i] << endl;
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>

using namespace std;

int main(){
	
	int A[100] = {};
	int B[100] = {};
	int a, count = 0;
	
	while( cin >> a) {
		
		A[a-1] ++;
		B[a-1] ++;
		count++;
	}
	sort(B, B+count);
	
	for(int i=0;i<100;i++)
	if( A[i] == B[count-1])
	cout << i+1 << "\n";
	
    return 0;
}

C++: #include <iostream>

using namespace std;

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

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

const int INF = 1e+9 * 2;
double eps = 1e-10;

int main() {
	int n[128] = {0}, c = 0, maxim = 0;
	while(cin >> n[c++]);
	int cnt[128] = {0};
	for(int i = 0; i < c; ++i)
		cnt[n[i]]++;
		
	for(int i = 0; i <= 100; ++i)
		if(maxim < cnt[i])
			maxim = cnt[i];
	for(int i = 0; i <= 100; ++i)
		if(maxim == cnt[i])
			cout << i << endl;
	
	return 0;
}

C++: #include<iostream>

int main(){
  int num[101]={};
  int number,max;

  while(std::cin >> number){
    ++num[number];
  }
  max = 0;
  for(int i=1;i<101;i++){
    if(num[i]>max){
      max = num[i];
    }
  }
  for(int i=1;i<101;i++){
    if(num[i]==max){
      std::cout << i << std::endl;
    }
  }
}

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

C++: #include <iostream>

template <typename T , unsigned N>
auto findMax (T (& a) [N]) -> T
{
    auto res = a [0];
    for (auto && elem : a)
    {
        res = std::max (res , elem);
    }
    return res;
}

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

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <string>
#include <queue>
#include <set>
#include <algorithm>

using namespace std;

int main() {
	int occurs[101];
	
	for (int i = 0; i < 101; i++) {
		occurs[i] = 0;
	}
	
	int input = -1;
	cin >> input;
	while (input >= 0) {
		occurs[input]++;
		
		input = -1;
		cin >> input;
	}
	
	int maxVal = 0;
	for (int i = 0; i < 101; i++) {
		if (occurs[i] > maxVal) maxVal = occurs[i];
	}
	
	for (int i = 0; i < 101; i++) {
		if (occurs[i] == maxVal) cout << i << endl;
	}
	
	return 0;
}

C++: #include <stdio.h>
int main()
{
	int a[101]={0},b,max=0;
	while(scanf("%d",&b)!=EOF)
		a[b]++;
	for(int i=1;i<=100;i++){
		if(max<a[i])
			max=a[i];
	}
	for(int i=1;i<=100;i++){
		if(max==a[i])
			printf("%d\n",i);
	}
	return 0;
}

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

int date[101]={0};
int memo[101]={0};
int i=0;
int main(){
  int n,mc=1;
  //入力フェイズ
  while(cin >> n){
    date[n]=date[n]+1;
   // memo[i]=n;
   // i++;
    mc=max(mc,date[n]);
   // cout <<"最大値:" <<mc << endl;
   // cout << date[n] << endl;
   // cout << mc << endl;
    }
  //sort(date.begin(),date.end());
  for(int j=0;j<=100;j++){
    if(mc==date[j]){
      cout << j << endl;
    }
  }
}

C++: #include <iostream>
#include <vector>
using namespace std;
int main(){
    int n,num,max=-1,ans[101],a=0,b=0;
    vector<int>count(101,0);
    while(cin>>num){
            count[num]++;
            
        }
        for(int i=100;i>=0;i--){
            if(count[i]>max && count[i]!=0){
                b=count[i];
                max=count[i];
            }
        }
    for(int i=0;i<101;i++){
        if(count[i]==b){
            cout<<i<<endl;
        }
    }
    for(int i=0;i<a;i++){
        
    }
    return 0;
}