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 <cstdio>

using namespace std;

int a[100],mp[101] = {0};

signed main()
{
    int key, j = 0;
    while ( scanf("%d\n", &key ) != EOF)
    {
        a[j] = key;
        mp[ key ]++;
        j++;
    }
    int mode_value = 0;
    for( int i = 1; i <= 100; i++ )
    {
        if( mode_value < mp[i] )
        {
            mode_value = mp[i];
        }
    }
    
    for( int i = 1; i <= 100; i++ )
    {
        if( mp[i] == mode_value )
        {
            printf( "%d\n", i );
        }
    }
    return 0;
}

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

using namespace std;

int main()
{
	vector<int> a(101, 0);
	int n, max = 0;
	
	while (cin >> n)
	{
		a[n]++;
		if (a[n] > max) max = a[n];
	}

	for (int i = 1; i < a.size(); ++i)
		if (a[i] == max) cout << i << endl;

	return 0;
}

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

using namespace std;

int main()
{
	vector<int> a(101, 0);
	int n, max = 0;
	
	while (cin >> n, n != 4)
	{
		a[n]++;
		if (a[n] > max) max = a[n];
	}

	for (int i = 1; i < a.size(); ++i)
		if (a[i] == max) cout << i << endl;

	return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<map>
#include<queue>
#include<vector>
using namespace std;

int main() {
	vector<int> a(101),A(101);
	for (int b; cin >> b;) a[b]++;
	A = a;
	sort(A.rbegin(),A.rend());
	for (int i = 0; i < 101; i++) 
		if (a[i] == A[0])cout << i << endl;

	return 0;
}

C++: # include <iostream>
# include <algorithm>
# include <stdio.h> 
using namespace std;
int a[101];
int c[101];

int main(){
    int num = 0;
    int max = 0;
    int b;
   while((scanf("%d",&b)) != EOF){
        a[b]++;
    }
    for(int i = 1; i < 101 ; i++){
        if (a[i] > max) max=a[i];
    }
    for(int i = 1; i < 101 ; i++){
        if (a[i] == max){
            c[num] = i;
            num++;
        }
    }
    sort(c,c+num);
    for(int i = 0; i < num; i++){
        cout<<c[i]<<endl;
    }
}

C++: #include <iostream>

using namespace std;

int main(){

	int n,max=0;
	int s[101]={0};
	while(cin>>n){
		s[n]++;
	}
	for(int i=0;i<101;i++){
		if(max<s[i])
			max=s[i];
	}
	for(int i=0;i<101;i++){
		if(max==s[i])
			cout<<i<<endl;
	}
	
}

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

int main(){
    int n, m=0;
    int a[101];
    vector<int> ans;

    for(int i=1 ; i <= 100 ; i++){
        a[i] = 0;
    }
    while( cin >> n ){
        a[n]++;
    }
    for(int i=1 ; i <= 100 ; i++){
        m = max( a[i] , m );
    }
    for(int i=1 ; i <= 100 ; i++){
        if( m == a[i] ) ans.push_back(i);
    }
    sort( ans.begin() , ans.end() );
    for(int i=0 ; i < ans.size() ; i++ ){
        cout << ans[i] << endl;
    }
}

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

#define N 100
#define MYSCAN scanf

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 (MYSCAN("%d", &input) != EOF){
		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>
#include <cstdio>
#include <vector>
#include <list>
#include <algorithm>
#include <cmath>
#include <stack>
#include <set>
using namespace std;

#define REP(i,n) for(int (i)=0; (i)<(n); (i)++)
#define FOR(i,a,b) for(int (i)=(a); (i)<(b); (i)++)
#define PUSH(n,v) for(int i=0; i<(n); i++) {int j; cin >> j; v.push_back(j);}
#define ALL(v) v.begin(), v.end()

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

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

C++: #include <iostream>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <string>
#include <math.h>
#include <functional>
#include <algorithm>
#include <utility>

typedef long long Int;
#define REP(i,n) for(int i = 0 ; i < n ; ++i)
using namespace std;

Int aa[120];

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

	Int b = 0;

	REP(i, 120){
		b = max(b, aa[i]);
	}

	REP(i, 120){
		if (aa[i] == b)
			cout << i;
	}

	return 0;
}

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


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

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

using namespace std;
int main(){
	int a[101]={0},n=0,saidai[100]={0},m=0;
	while(cin>>n){
		a[n]++;
	}
	for(int i=1;i<101;i++){
		if(saidai[m]<a[i]){
			for(int x=0;x<=m;x++){
				saidai[x]=0;
				m=0;
			}
			saidai[m]=i;
		}
		else if(saidai[m]==a[i]){
			saidai[m+1]=saidai[m];
			saidai[m]=i;
			m++;
		}
	}
	sort(saidai,saidai+100);
	for(int i=0;i<=100;i++){
		if(saidai[i]!=0){
			cout<<saidai[i]<<endl;
		}
	}
	return 0;
}

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

using namespace std;

int main()
{
    int input[100] = {0};
    vector <int> output;
    int num;
    
    while (cin >> num) 
        input[num - 1]++;

    int max = 0;
    for (int i = 0; i < 100; i++) 
        if (input[i] > max)
            max = input[i];

    for (int i = 0; i < 100; i++)
        if (input[i] == max)
            output.push_back(i + 1);

    sort(output.begin(), output.end());
    for (int i = 0; i < output.size(); i++)
        cout << output[i] << endl;
    
    return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int l[100];
	int n = 0;
	while (!cin.eof()){
		int g;
		cin >> g;
		l[g-1]++;
		if (l[g-1] >= n) n = l[g];
	}
	for (int i = 0; i < 100; i++){
		if (l[i] == n) {
			cout << i + 1 << endl;
		}
	}
	char c;
	cin >> c;
}

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

int a[100];

int main(void) {
	int n;
	int max = 0;
	for (int i = 0; i < 100; i++)a[i] = 0;

	while (scanf("%d", &n) != EOF) {
		a[n]++;
	}

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

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

int main() {

  int cnt[100] = {0};
  int cnt_max = 0;
  int input;

  while( cin >> input ) {

    cnt[input-1]++;
    cnt_max = max( cnt_max, cnt[input-1] );

  }

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

    if ( cnt[i] == cnt_max ) cout << i+1 << endl;

  }

  return 0;

}