Go: package main

import (
	"fmt"
	"sort"
)

func main() {
	var max int

	numbers := map[int]int{}
	for {
		var a int
		_, err := fmt.Scan(&a)
		if err != nil {
			break
		}
		numbers[a]++
		if numbers[a] >= max {
			max = numbers[a]
		}
	}

	var modes []int
	for a, b := range numbers {
		if b == max {
			modes = append(modes, a)
		}
	}

	sort.Ints(modes)
	for _, mode := range modes {
		fmt.Println(mode)
	}
}

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

int main(){
	const int limit = 101;
	int x;
	int integers[limit];
	for(int i = 1; i < limit; i++)
		integers[i] = 0;
	while(cin >> x) integers[x]++;
	int kmax = 0;
	for(int i = 1; i < limit; i++)
		kmax = max(kmax, integers[i]);
	for(int j = 1; j < limit; j++)
		if(integers[j] == kmax)
			cout << j << endl;
	return 0;
}

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

int main()
{
	int count = 0;
	int _in;
	int in[100] = {};
	
	while(scanf("%d",&_in)+1){
		++in[_in];	
	}
	
	_in = max(in[0],in[99]);
	for(int i=0;i<100;++i){
		if(in[i] == _in){
			cout << i << endl;
		}
	}
	
	return 0;
}

C++: #include <iostream>
#include <string>
using namespace std;
int main(){
int a[100];
int b;
b=0;
while(b<100){
a[b]=0;
b=b+1;}
int n;
while(cin >>n){
a[n]=a[n]+1;}
int c;
c=0;
b=0;
while(b<100){
if(a[b]>c){c=a[b];}
b=b+1;}
b=0;
while(b<100){
if(c==a[b]){cout <<b<<endl;}
b=b+1;}
}

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

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

C++: #include<iostream>
using namespace std;
int const N = 101;
int main(){
  int num[N],M[N];
  int n,max,min;
  for(int i=1;i<=100;i++){
    num[i] = 0;
  }
  while(cin >> n){
    num[n]++;
  }
  max = num[1];
  min = num[1];
  for(int i=1;i<=100;i++){
    if(max < num[i])
      max = num[i];
  }
  for(int i=1;i<=100;i++){
    int count = 0;
    if(max == num[i])
      cout << i << endl;
    
  }

  
}

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


int main(){

	int n,max=0,x[100]={0};
	int x_max;
	
	while (scanf("%d",&n)!=EOF) {
		x[n-1]++;
	}
	
	for (int i=0; i<100; i++) {
		if (max<x[i]) {
			max=x[i];
			x_max=i;
		}
	}
	cout << x_max+1 << endl;
	
	for (int i=x_max+1; i<100; i++) {
		if (x[x_max]==x[i]) {
			cout << i+1 <<endl;
		}
	}
		
	return 0;
}

C++: #include<cstdio>

using namespace std;

int main(void){
	int in[100],data,ans[100],cnt,work=0;
	int i,j;	//ループカウンタ

	for(i=0;i<100;i++){
		ans[i]=0;
		in[i]=0;
	}

	for(i=0;i<100;i++){
		if(scanf("%d",&data)==EOF)	break;	//EOF=Ctrl+z
		in[data]++;
	}
	
	for(i=1;i<100;i++)
		if(in[work]<in[i])	work=i;
	
	ans[0]=work;
	cnt=0;
	for(i=1;i<100;i++){
		if(in[work]==in[i] && i!=work){
			cnt++;
			ans[cnt]=i;
		}
	}

	for(i=0;i<=cnt-1;i++){
		for(j=1;j<=cnt;j++){
			if(ans[i]>ans[j]){
				work=ans[i];
				ans[i]=ans[j];
				ans[j]=work;
			}
		}
	}
	
	for(i=0;i<=cnt;i++)
		printf("%d\n",ans[i]);

	return 0;
}

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

using namespace std;

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

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

int main(){
  int n;
  int max=0;
  int seq[100];
  int i;

  for(i=0; i<100; i++) seq[i]=0;
  while(cin>>n){
    seq[n]++;
    if(max<seq[n]) max=seq[n];
  }
  for(i=0; i<100; i++)
    if(seq[i]==max) printf("%d\n", i);

  return 0;
}

C++: #include <iostream>

int main(){
	int a,c=0,t=0;
	int b[101],f[101],z[101],x[101];
	z[0]=0;
	
	while(std::cin>>a){
         c++;
	    b[c]=a;
	}
	for(int g=1;g<=100;g++){
		f[g]=0;
		z[g]=0;
	}

	for(int d=1;d<=c;d++){
			f[b[d]]++;
			}
	
	for(int g=1;g<=100;g++){
		
			if(f[g]>z[0]){
			
			z[0]=f[g];
			x[0]=g;
				t=0;
			}else if(f[g]==z[0]){
				t++;
			
				x[t]=g;
		}
	}
	
	for(int p=0;p<=t;p++){
		std::cout<<z[p]<<std::endl;
	}
	return 0;
		}

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

#define N 100

int main(void){

	int i;
	int input, max = 0;
	int bucket[N + 1];

	// テゥツ?催・ツ按療」ツ?ョテ・ツ按敕ヲツ慊淌・ツ個?
	for (int i = 0; i < N + 1; i++){
		bucket[i] = 0;
	}

	// テ・ツ?・テ・ツ環崚」ツ?ォテ」ツ?療」ツ?淌」ツ?古」ツ?」テ」ツ?ヲテゥツ??ヲツャツ。テゥツ?催・ツ按療」ツつ津」ツつォテ」ツつヲテ」ツδウテ」ツδ暗」ツつ「テ」ツδε」ツδ?
	while (cin >> input){
		bucket[input]++;
	}

	// テ」ツつづ」ツ?」テ」ツ?ィテ」ツつづ・ツ、ツ堙」ツ?湘・ツ?コテ」ツ?淌・ツ崢榲ヲツ閉ーテ」ツつ津ヲツアツづ」ツつ?」ツつ?
	for (int i = 0; i < N + 1; i++){
		if (max < bucket[i]){
			max = bucket[i];
		}
	}

	// テ」ツ?敕」ツ?ョテ・ツ崢榲ヲツ閉ーテ」ツ??」ツ?妥・ツ?・テ・ツ環崚」ツ?陛」ツつ古」ツ?淌ヲツ閉ーテ・ツ?、テ」ツつ津・ツ?コテ・ツ環?
	for (int i = 0; i < N + 1; i++){
		if (max == bucket[i]){
			printf("%d\n", i);
		}
	}

	return 0;
}

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

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

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
using namespace std;
 
const int MAX= 10000100;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

int main(void){
  int a[100] = {0};
  int n;
  int len = 0;
  while(cin>>n){
    a[n-1] ++;
  }
  int max = -1;
  vector<int> res;
   rep(i,100){
    if(a[i] > max){
 
      max = a[i];
      res.clear();
      res.pb(i);
    }
    if(a[i] == max)res.pb(i);
  }
  rep(i,res.size())cout<<res[i]+1<<endl;

}