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>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <ctime>
#include <cassert>
#include <iostream>
#include <cctype>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <utility>
#include <numeric>
#include <algorithm>
#include <bitset>
#include <complex>
#include <fstream>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for(int i = x; i < n; i++)
template<class T> T RoundOff(T a){ return int(a+.5-(a<0)); }
template<class T, class C> void chmax(T& a, C b){ if(a < b) a = b; }
template<class T, class C> void chmin(T& a, C b){ if(b < a) a = b; }
template<class T, class C> pair<T, C> mp(T a, C b){ return make_pair(a, b); }

int main()
{
	int d[101] = {0}, in;

	while(cin >> in)
		d[in]++;
	
	int res = 0;
	vint nums;

	REP(i, 1, 101)
	{
		if(res < d[i])
		{
			nums.clear();
			nums.push_back(i);
			res = d[i];
		}
		else if(res == d[i])
			nums.push_back(i);
	}

	rep(i, nums.size())
		cout << nums[i] << endl;
}

C++: #include <iostream>

using namespace std;
int main(void){
    // Here your code !

int n,a[100];
int b=0;
for(int i=0;i<100;i++){
    a[i]=0;
}

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

for(int i=0;i<100;i++){
   b=max(b,a[i]);
}
for(int i=0;i<100;i++){
if(b==a[i]) cout<<i<<endl;
}



}

C++: #include <iostream>

using namespace std;

int freq[100];

int main () {
  int n;
  int index_mode = 0;

  while(cin >> n)
    freq[n-1]++;

  for(int i = 0; i < 100; i++){
    if (freq[i] > freq[index_mode])
      index_mode = i;
  }

  for(int i = 0; i < 100; i++){
    if (freq[i] == freq[index_mode])
      cout << i+1 << endl;
  }
}

C++: #include <iostream>
#include <array>
#include <algorithm>
#include <iterator>
#include <cstdint>

int main()
{
	typedef std::array<std::uint16_t, 100> DataArray;
	DataArray datas;
	datas.fill(0);

	std::uint16_t max_occurence = 0;
	std::uint16_t num;
	while (std::cin >> num) {
		max_occurence = std::max(max_occurence, ++datas[num - 1]);
	}

	for (DataArray::const_iterator pos =
			std::find(datas.cbegin(), datas.cend(), max_occurence);
		 pos != datas.end();
		 pos = std::find(pos, datas.cend(), max_occurence)) {
			std::cout << std::distance(datas.cbegin(), ++pos) << std::endl;
	}

	return 0;
}

C++: #include <stdio.h>

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

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

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

  return 0;
}

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

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

int main()
{
	std::vector<int> hist(100, 0);

	int index = 0;
	int max = 0;
	while (std::cin >> index)
	{
		hist[index - 1]++;
		if (max < hist[index - 1])
		{
			max = hist[index - 1];
		}
	}

	int i = 1;
	for (const auto& h : hist)
	{
		if (h == max)
		{
			std::cout << i << std::endl;
		}
		++i;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;
#define rep2(x,from,to) for(int x=(from); x<(to); (x)++)
#define rep(x,to) rep2(x,0,to)
int main() {
	int n, a[101];
	while(cin >> n) {
		a[n]++;
	}
	int max = 0;
	rep2(i,1,100) {
		if(max < a[i]) max = a[i];
	}
	rep2(i,1,100) {
		if(a[i] == max) {
			cout << i << endl;
		}
	}
	return 0;
}

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

int main(){
    int n;
    vector<int> f(101, 0);
    while (1){
	cin >> n;
	if (cin.eof()) break;
	f[n]++;
    }
    int max = 0;
    for (int i = 0; i < f.size(); i++) if (max < f[i]) max = f[i];
    for (int i = 0; i < f.size(); i++) if (f[i] == max) cout << i << endl;
}

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

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

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 + 1 << endl; }
	}
}

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

C++: #define scanf_s scanf
//#define gets_s gets
#include <stdio.h>
#include <string>
#include <iostream>
#include <math.h>
using namespace std;
#define MAX 50//00
#define MIN -100001
#define _MAX 100
#define g 9.8
#define d 4.9
int main(void)
{
	int a[_MAX] = { 0 }, x, max = 0;
	while (scanf_s("%d", &x) != EOF) {
		++a[x - 1];
		if (a[x - 1] > max) max = a[x - 1];
	}
	for (int i = 0; i < _MAX; ++i) {
		if (a[i] == max) {
			printf("%d\n", i + 1);
		}
	}s
}

C++: #include<iostream>

using namespace std;

int list[101];

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

C++: #include <cstdio>
#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cmath>
#define rep(i,a,n) for(int i=a;i<n;i++)
using namespace std;

int main(void){
	int n,a[101],m=0;
	rep(i,1,101){
		a[i]=0;
	}
	while( cin >> n ){
		a[n]++;
	}
	rep(i,1,101){
		if(m < a[i]){
			m=a[i];
		}
	}
	rep(i,1,101){
		if(m == a[i]){
			cout << a[i] << "\n";
		}
	}
	return 0;
}

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

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