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

using namespace std;

int main() {
	int num[101] = { 0 };
	int a;
	while (cin >> a) {
		num[a] += 1;
	}
	int max = -1;
	vector<int> vec;
	for (int i = 0; i <= 100; i++) {
		if (num[i] == max) {
			vec.push_back(i);
		}

		if (num[i] > max) {
			max = num[i];
			vec.clear();
			vec.push_back(i);
		}
	}
	for (int j = 0; j < vec.size(); j++) {
		cout << vec[j] << endl;
	}
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <cmath>
#include <utility>

#define ll (long long)
#define REP(i,n) for(int i = 0;i<(int)n;i++)
#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (a);i>(b);i--)

using namespace std;

/*thief??????*/

int main(void){
    
    int input[120] = {0};
    int c  = 1;
    int check[101] = {0};
    int asnwer[101] = {0};
    int max = 0;
    while(cin >> input[c])
    {
        int temp = input[c];
        check[temp]++;
        c++;
    }
    REP(i, 101)
        if(max <= check[i])
            max = check[i];
    
    REP(i,101) if(check[i] == max) cout << i << endl;
    return 0;
        }

C++: #include <stdio.h>
#include <math.h>
#include <iostream>

using namespace std;

int main() {

	int counter[10] = {0};
	int a;
	int MAX = 0;
	int i = 0;
	
	while (cin >> a) {
		counter[a]++;
	}

	for (int j = 1; j < 10; j++) {
		MAX = max(MAX, counter[j]);
	}

	for (int k = 1; k < 10; k++) {
		if (MAX == counter[k]) {
			cout << k << endl;
		}
	}

	return 0;
}

C++: #include<iostream>
#include<map>
using namespace std;
int main(){
  map<int,int> num;
  int n,a=0;
  while(cin >>n) num[n]++;
  for(map<int,int>::iterator it = num.begin(); it!=num.end(); it++){
    if(a<(it->second)) a = it->second;
  }
  for(map<int,int>::iterator it = num.begin(); it!=num.end(); it++){
    if(a == (it->second)) cout<<(it->first)<<endl;
  }
  return 0;
}

C++: #include<cstdio>
#include<iostream>
using namespace std;
int main()
{
    int da[150]={0},a,i=0,max=0;
    while(cin>>a)
    {
        da[a]++;
        if(max<=da[a])max=da[a];
    }
    for(int j=0;j<150;j++)
    {
        if(da[j]==max)cout<<j<<endl;
    }
    return 0;
}

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

using namespace std;

int main(){
	int num, max;
	int list[100] = {0};
	
	max = 0;

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

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

#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (int i = int(n); i >= 0; i--)
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define repic(i, a, b) for (int i = int(a); i <= int(b); i++)
#define each(x, y) for (auto &x : y)
#define all(a) (a).begin(), (a).end()
#define bit(b) (1ll << (b))

using namespace std;

using i32 = int;
using i64 = long long;
using u64 = unsigned long long;
using f80 = long double;
using vi32 = vector<i32>;
using vi64 = vector<i64>;
using vu64 = vector<u64>;
using vf80 = vector<f80>;
using vstr = vector<string>;

inline void yes() { cout << "Yes" << '\n'; exit(0); }
inline void no() { cout << "No" << '\n'; exit(0); }
inline i64 gcd(i64 a, i64 b) { if (min(a, b) == 0) return max(a, b); if (a % b == 0) return b; return gcd(b, a % b); }
inline i64 lcm(i64 a, i64 b) { return a / gcd(a, b) * b; }
inline u64 xorshift() { static u64 x = 88172645463325252ull; x = x ^ (x << 7); return x = x ^ (x >> 9); }
void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
template <typename T> class pqasc : public priority_queue<T, vector<T>, greater<T>> {};
template <typename T> class pqdesc : public priority_queue<T, vector<T>, less<T>> {};
template <typename T> inline void amax(T &x, T y) { if (x < y) x = y; }
template <typename T> inline void amin(T &x, T y) { if (x > y) x = y; }
template <typename T> inline T power(T x, i64 n, T e = 1) { T r = e; while (n > 0) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; }
template <typename T> istream& operator>>(istream &is, vector<T> &v) { each(x, v) is >> x; return is; }
template <typename T> ostream& operator<<(ostream &os, vector<T> &v) { rep(i, v.size()) { if (i) os << ' '; os << v[i]; } return os; }
template <typename T, typename S> istream& operator>>(istream &is, pair<T, S> &p) { is >> p.first >> p.second; return is; }
template <typename T, typename S> ostream& operator<<(ostream &os, pair<T, S> &p) { os << p.first << ' ' << p.second; return os; }

void solve() {
  vi32 cnt(101);
  int n;
  while (cin >> n) {
    cnt[n]++;
  }
  int ma = 0;
  reps(i, 100) amax(ma, cnt[i]);
  reps(i, 100) {
    if (cnt[i] == ma) cout << i << '\n';
  }
}

C++: #include<stdio.h>

int table[101];

int main(void) {
  int target;

  int num = 0;
  int max = 0;
  while(scanf("%d", &target) != EOF) {
    table[target]++;
    num++;
    if(max < table[target]) {
      max = table[target];
    }
  }
  for(int i = 1; i < 101; i++) {
    if(table[i] == max) {
      printf("%d\n", i);
    }
  }
  return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<vector>
using namespace std;
int main()
{
int a[100];
for(int i=0;i<100;i++)a[i]=0;
int n;
while(cin >> n){
a[n-1]++;
}
int ans=0;
for(int i=1;i<100;i++){
if(a[ans]<a[i])ans=i;
}
cout << i+1 << "\n";
return 0;
}

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

using namespace std;

#define reps(i,f,n) for(int i=f;i<int(n);i++)
#define rep(i,n) reps(i,0,n)


#define X real()
#define Y imag()
typedef complex<double> P;

int main(){
	
	map<int,int> m;
	int a;
	while(scanf("%d",&a)!=EOF){
		m[a]++;
	}
	
	typedef pair<int,int> pii;
	vector<pii> b;
	
	map<int,int>::iterator it = m.begin();
	while(it!=m.end()){
		b.push_back(pii(-it->second, it->first));
		it++;
	}
	
	sort(b.begin(),b.end());
	
	for(int i=0;i<b.size();i++){
		if(i!=0 && b[i].first!=b[i-1].first){
			break;
		}
		printf("%d\n",b[i].second);
	}
	
	
}

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

int main(){

  int i, m, a[N] = {};
  while(cin >> i)
    a[i]++;

  for(int j = 1; j < N; j++) 
    m = max(m,a[j]);

  for(int k = 1; k < N; k++)
    if(a[k] == m) 
      cout << k << "\n";
  
}

C++: #include <iostream>
#include <algorithm>
#include <stdio.h>

using namespace std;

int main(){
	int ary[100];
	int hikaku[100];
	int n;
	int a = 0;
	
	for(int i = 1; i <= 100; i++){
		ary[i] = i;
		hikaku[i] = 0;
	}

	while(scanf("%d",&n) != EOF){

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

			if(ary[i] == n){
				hikaku[i]++;
				a = max(a,hikaku[i]);
			}
		}

	}

	for(int i = 1; i <= 100; i++){
		
		if(a == hikaku[i]){
			cout << i << endl;
		}
	}

	return 0;
}

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

int main() {
	map<int,int> data;
	int n,max;
	while (cin >> n) {
		data[n]++;
	}
	max = 0;
	for (int i = 0; i < data.size();i++)
		if( data[i] > max )
			max = data[i];
	
	map<int,int>::iterator it = data.begin();
	while (it != data.end()) {
		if ( (*it).second == max )
			cout << (*it).first << endl;
		it++;
	}
	return 0;
}