Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

type Pair struct {
	key   int
	value int
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for {
		n, err := nextInt()
		if err != nil {
			break
		}

		counts[n]++
	}

	pairs := []Pair{}
	for k, v := range counts {
		pairs = append(pairs, Pair{k, v})
	}
	sort.Slice(pairs, func(i, j int) bool {
		if pairs[i].value == pairs[j].value {
			return pairs[i].key < pairs[j].key
		}
		return pairs[i].value > pairs[j].value
	})

	vMax := 0
	for _, pair := range pairs {
		if vMax != 0 && vMax != pair.value {
			break
		}
		if pair.value > vMax {
			vMax = pair.value
		}
		fmt.Println(pair.key)
	}
}

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;

}

C++: #include <algorithm>
#include <bitset>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define FOR(x,a,b) for(int x=a;x<b;x++)
#define REP(x,b) for(int x=0;x<b;x++)
#define FORSIZE(x,A) for(int x=0;x<A.size();x++)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define SORT(x) sort(x.begin(),x.end())
#define RSORT(x) sort(x.rbegin(),x.rend())
#define rsort(x,n) sort(x, x+n, greater<int>())
#define REV(x) reverse(x.begin(),x.end())
using namespace std;
typedef long long ll;
inline int toInt(std::string s) {int v; std::istringstream sin(s);sin>>v;return v;}
template<class T> inline std::string toString(T x) {std::ostringstream sout;sout<<x;return sout.str();}

int main( int argc, const char* argv[] )
{
    int a[101];
    int tmp;
    int c = 0;
    int m = 0;
    fill(a, a+101, 0);
    while (cin >> tmp) {
        a[tmp] += 1;
        c += 1;
    }
    FOR(i, 0, 101) {
        m = max(m, a[i]);
    }
    FOR(i, 0, 101) {
        if (a[i] == m) {
            cout << i << endl;
        }
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(void){
    int i,month=0;
    int day[100]={};
    while(cin >> i)                 day[i-1]++;
    for(i=0; i<100; i++)            month=max(month,day[i]);
    for(i=0; i<100; i++){
        if(day[i] == month)         cout << (i+1) << endl;
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int n,a[101]={0},k=0;
  while(cin>>n){
    a[n]++;
    n=max(a[n],n);
  }
  for(int i=1;i<100;i++)if(a[i]==n)cout<<i<<endl;
}

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

int main()
{
	int data[101] = {0};
	int n, max;
	
	while (scanf("%d", &n)){
		data[n]++;
	}
	
	for (int i = 0; i < 101; i++){
		if (max < data[i]){
			max = data[i];
		}
	}
	
	for (int i = 0; i < 101; i++){
		if (max == data[i]){
			printf("%d", i);
		}
	}
	
	return (0);
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <set>
#include <cmath>
#include <algorithm>
using namespace std;

int main(){
	int mx=0;
	int arr[101]={0};
	int j=0,n;
	while(cin>>n){
		arr[n]++;
	}
	for(int i=1 ; i<101 ; ++i){
		if(mx<arr[i])
			mx=arr[i];
	}
	for(int i=0 ; i<101 ; ++i){
		if(arr[i]==mx){
			cout << i << endl;
		}
	}
	cout << endl;
	return 0; 
}