Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	table := make([]int, 100)
	now := 0
	max := 0
	for i := range table {
		table[i] = 0
	}
	for scanner.Scan() {
		now, _ =strconv.Atoi(scanner.Text())
		table[now-1]++
		if table[now-1] > max {
			max = table[now-1]
		}
	}
	for i := 0; i < 100; i++ {
		if table[i] == max {
			fmt.Println(i+1)
		}
	}
}

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

int main(){
	int n, a[101], m = 0;
	fill(a, a+101, 0);
	for(int i = 0;cin >> n;i++){
		if(!n)break;
		a[n]++;
		if(a[n] > m)m = a[n];
	}
	for(int i = 0;i < 101;i++)if(a[i] == m)cout << i << endl;
	return 0; 
}

C++: #include <iostream>
#include <stdlib.h>

using namespace std;

int main(int argc, char **argv)
{
	int tmp;
	int *array = (int *)calloc(1000, sizeof(int));
	
	while(cin >> tmp){
		array[tmp]++;
	}
	
	tmp = 0;
	for(int i = 0; i < 1000; i++){
		if(tmp < array[i]){
			tmp = array[i];
		}
	}
	
	for(int i = 0; i < 1000; i++){
		if(array[i] == tmp){
			cout << i << endl;
		}
	}
	
	free(array);
	return 0;
}

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

int main()
{
	int data[101] = {0};
	int n, max;
	
	while (scanf("%d", &n) != EOF){
		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<cstdio>
#include<iostream>
int main(void){
  
  int a[100];
  int i;
 
  for(i=0;i<100;i++)
    a[i]=i+1;
  
  int j;
  int n;
  int count[100]={0};
  int max=0;
  
  for(j=0;j<100;j++){
    scanf("%d",&n);
    if(n==0)
      break;
    
    for(i=0;i<100;i++){
      if(a[i]==n){
	count[i]++;
      }
      if(count[i]>max){
	max=count[i];
      }
    }
  }

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

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

#define rep(x,to) for(int x=0;x<to;x++)
#define rep2(x,from,to) for(x=from;x<to;x++)

using namespace std;


int main(void){

int shk[102]={0}, su;
	while(cin >> su ){
		shk[su]++;
	}
	int j, mx = -999;
	rep2(j,1,101) mx = max(mx,shk[j]);
	rep2(j,1,101) if(mx==shk[j]) cout << j << endl;
	
	
	return 0;
}

C++: // 失敗するからこそ そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
#ifdef DAIJOBU
#include "/home/v-o_o-v/deb.h"
#define deb(x...) cerr << "[" << #x << "] = ["; _print(x)
#else
#include <bits/stdc++.h>
#define deb(x...)
#endif 

using namespace std;

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	int max_cnt = 0;
	map<int, int> m;
	int n;
	while(cin >> n){
		m[n]++;
		max_cnt = max(max_cnt, m[n]);
	}
	for(auto i:m){
		if(i.second == max_cnt)cout << i.first << '\n';
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main() {
	int line[101] = { 0 };
	int code;
	while (cin >> code) {
		++line[code];
	}
	int max = 0;
	for (int i = 1; i <= 100; ++i) {
		if (max < line[i])max = line[i];
	}
	for (int i = 1; i <= 100; ++i) {
		if (line[i] == max)cout << i << endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#define rep(i,n)for(ll i=0;i<n;i++)
using namespace std;
typedef long long ll;

int a[101];

int main() {
	int n;
	while (cin >> n)a[n]++;
	int Max = *max_element(a, a + 101);
	rep(i, 101) {
		if (a[i] == Max)cout << i << endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

void count_num(int a,int b){
    string WDay[7] = {"Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"};
    int len[12] = {31,29,31,30,31,30,31,31,30,31,30,31};
    int count = 0;
    for(int i = 0; i< a-1;i++){
        count += len[i];
    }
    count += b;
    cout << WDay[(count+2) % 7] << endl;
}

int main() {
    int a,b;
    while(cin >> a >>  b , a){
        count_num(a,b);
    }
    return 0;
}

C++: 
#include <iostream>
#include<string>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<vector>
using namespace std;
int main(){
    int a,i,max=0;
    vector<int> count(100,0);
    while(cin>>a){
        count[a]++;
    }
    for(i=1;i<count.size();i++){
        if(max<count[i])max=count[i];
    }
    for(i=1;i<count.size();i++){
        if(max==count[i])cout<<i<<endl;
    }
          return 0;
}

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

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

C++: #include <algorithm>
#include <cmath>
#include <climits>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <cassert>
#include <functional>

using namespace std;

#define LOG(...) printf(__VA_ARGS__)
//#define LOG(...)
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define REP(i,n) for(int i=0;i<(int)(n);++i)
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define RSORT(c) sort((c).rbegin(),(c).rend())
#define CLR(a) memset((a), 0 ,sizeof(a))

typedef long long ll;
typedef unsigned long long ull;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vb> vvb;
typedef vector<vi> vvi;
typedef vector<vll> vvll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int dx[] = { -1, 0, 1, 0 }; const int dy[] = { 0, 1, 0, -1 };

int main() {
	int a[100] = { 0 };
	int n;
	while (cin >> n,n)
		a[n - 1]++;

	int ma = 0;
	REP(i, 100){
		ma = max(ma, a[i]);
	}
	REP(i, 100){
		if (a[i] == ma)
			cout << (i + 1) << endl;
	}
	return 0;
}

C++: /* AOJ0028 Mode Value */  
  
#include <iostream>  
#include <algorithm>  
#include <map>  
#include <vector>  
  
using namespace std;  
  
typedef pair<int, int> PAIR;  
  
bool cmp(const PAIR& left, const PAIR& right)  
{  
    return left.second == right.second ? left.first < right.first : left.second > right.second;  
}  
  
int main()  
{  
    map<int, int> m;  
    int a, max;  
  
    while(~scanf("%d", &a))  
        m[a]++;  
  
    // map中元素转存到vector中  
    vector<PAIR> v(m.begin(), m.end());  
  
    // vector排序  
    sort(v.begin(), v.end(), cmp);  
  
    max = v[0].second;  
    for (int i = 0; i != (int)v.size(); ++i)  
        if(v[i].second == max)  
            cout << v[i].first << endl;  
        else  
            break;  
  
    return 0;  
}  

//这是老师的程序，目前我写的话还是会有难度的

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>

using namespace std;


#define all(c) ((c).begin()), ((c).end())
#define debug(c) cerr << "> " << #c << " = " << (c) << endl;
#define iter(c) __typeof((c).begin())
#define present(c, e) ((c).find((e)) != (c).end())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define tr(i, c) for (iter(c) i = (c).begin(); i != (c).end(); i++)
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define REP(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define mp make_pair
#define fst first
#define snd second
#define pb push_back


const double EPS = 1e-10;


typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> pii;
typedef complex<double> P;


int main() {
	int m[200];
	rep(i, 200) m[i] = 0;
	int mv = 0;
	for (int a; cin >> a; ) mv = max(mv, ++m[a]);
	REP(i, 1, 100) if (m[i] == mv) cout << i << endl;
	
	return 0;
}