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)
	}
}

Python: h = {}
while True:
	try:
		a = int(input())
		if a in h:
			h[a] += 1
		else:
			h[a] = 1
	except EOFError:
		break
#print(h)
l = [(mode, 10000 - num) for num, mode in h.items()]
l.sort(reverse=True)
max_mode, num = l[0]
print(10000 - num)
for i in range(1,1000):
	if l[i][0] != max_mode: break
	mode, num = l[i]
	print(10000-num)

Python: # coding: utf-8
# Your code here!

l = [0] * 110

while True:
   try:
      n = int(input())
      l[n] += 1
   except EOFError:
      break

m = max(l)
for i in range(1, 101):
   if l[i] == m:
      print(i)

Python: # -*- coding: utf-8 -*-

import sys
import os
import datetime

d = {}
for s in sys.stdin:
    v = int(s)

    if v not in d:
        d[v] = 1
    else:
        d[v] += 1

max_value = max(d.values())

for key in d.keys():
    if d[key] == max_value:
        print(key)

Python: list=[]
try:
    while True:
        list.append(int(input()))
except EOFError:
    pass


count=[0]*101
for n in list:
    count[n]+=1



for n in range(len(list)):
    if count[n]==max(count):
        print(n)

Python: a = list([0] * 100)

while True :
    try :
        b=int(input())
        a[b-1] += 1
    except EOFError :
        break
    
x = max(a)
for i in range(100) :
    if a[i] == x :
        print(i+1)

Python: 
import sys
arr = {}
for i in sys.stdin:
    if int(i) in arr:
        arr[int(i)] += 1
    else:
        arr[int(i)] = 1
max = 0
ans = []
for i in arr.keys():
    if arr[i] > max:
        ans = [i]
        max = arr[i]
    elif arr[i] == max:
        ans.append(i)
for i in ans:
    print(i)

Python: import sys

def ModeValue():
    mode=[0 for i in range(0,101)]

    try:
        for n in sys.stdin:
            mode[int(n)]+=1
    except EOFError:
            a=1  
    maxN=max(mode)

    for i in mode:
        if mode[i]>maxN:
            print(i)
            
ModeValue()

Python: # 0028
array = []
while True:
    try:
        a = input()
        array.append(int(a))
    except EOFError:
        break
count = list(map(lambda a: array.count(a), set(array)))
modes = list(filter(lambda a: array.count(a) == max(count), set(array)))
print(*modes, sep = '\n')

Python: a=[]
try:
  while True:
     a.append(int(input()))
except EOFError:
  pass

counts = [0] * 101

for n in a:
  counts[n] += 1

for n in range(len(a)):
  if counts[n] == max(counts):
    print(n)

Python: import sys
array = []
array2 = []
num = 0
for i in sys.stdin.readlines():
    array.append(int(i))
for i in range(len(array)):
    if i == 0:
        a = 0
    elif array.count(array[i]) > a:
        num = array.count(array[i])
        a = array.count(array[i])
for i in range(len(array)):
    if array.count(array[i]) == num:
        array2.append(array[i])
array2 = list(set(array2))
for i in range(len(array2)):
    print(array2[i])

Python: a=[0]*100
while True:
	try:
		a[int(input())]+=1
	except:
		break
for i in range(100):
	if a[i]==max(a):
		print(i)

Python: a = [0 for i in range(101)]
while True:
  try:
    n = int(input())
    a[n] += 1
  except EOFError:
    break

m = 0
for i in range(1, 101):
  m = max(m, a[i])
for i in range(1, 101):
  if a[i] == m:
    print(i)

Python: 
a = [0] * 100
while True:
    try:
        a[int(input()) - 1] += 1
    except:
        break

flag = False
for i in range(100)[::-1]:
    if flag:
        exit()
    for j in range(100):
        if a[j] == i:
            flag = True
            print(j + 1)

Python: from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from sys import stdin
from collections import Counter
from itertools import takewhile
from operator import itemgetter

counter = Counter()
for line in stdin:
    if not line.split():
        break
    counter[int(line)] += 1

v = counter.most_common(1)[0][1]
mc = takewhile(lambda x: v == x[1], counter.most_common(100))
for n, _ in sorted(mc, key=itemgetter(0)):
    print(n)

Python: l=[0]*101
while True:
    try:
        i=int(input())
        l[i]+=1
    except:
        break
M=max(l)
for j in range(1,101):
    if l[j]==M:
        print(j)
    else:
        pass

Python: a=[]
while True:
    try:
        a.append(int(input()))
    except:
        break
count=[0]*101
for i in a:
    count[i]+=1
for i in range (len(a)):
    if count[i]==max(count):
        print(i)

Python: # 0028
array = []
while True:
    try:
        a = input()
        array.append(int(a))
    except EOFError: break
s = set(array)
mx = max(sorted(s, reverse=True), key = array.count)
for a in sorted(s, key = array.count, reverse=True):
    print(a)
    if a == mx: break

Python: c=[0]*101
while True :
    try : 
        a=int(input())
        c[a]=c[a]+1
    except EOFError :
        break
max=max(c)
for i in range(101):
    if c[i]==max:
        print(i)

Python: count = [0] * 101
maxCount = 0
while(True):
    try:
        s = input()
        count[s] += 1
        if(maxCount < count[s]):
            maxCount = count[s]
    except Exception:
        break   
for i in range(len(count)):
    if(maxCount == count[i]):
        print(i)

Python: import sys

A = [i+1 for i in range(100)]
B = [0 for i in range(100)]

a = [0 for i in range(100)]

for l in sys.stdin:
    a.append(int(l))

# for i in range(4):
#     a[i] = int(input())

for x in a:
    if x in A:
        B[x-1] += 1

max = max(B)

for i in range(100):
    if  B[i] == max:
        print(i+1)

Python: A=[]
while True:
	try:
		x=int(input())
		A.append(x)
	except EOFError:
		break

num=[]
for i in range(10):
	num.append((A.count(i),i))

num.sort(reverse=True)
mode_value=num[0][0]
B=[]
for i in num:
	if i[0]==mode_value:
		B.append(i[1])
		
B.reverse()
for i in B:
	print(i)

Python: lis=[0 for i in range(100)]
while True:
    try:
        N=int(input())
        lis[N-1] +=1
    except:
        for j in range(100):
            if lis[j]==max(lis):
                print(j+1)
        break

Python: x = []
try:
    while True:
        n = int(input())
        x.append(n)
except EOFError:
    pass

counts = [0]*101

for n in x:
    counts[n]+=1

for n in range(len(x)):
    if counts[n] == max(counts):
        print(n)

Python: lst = [0 for i in range(1,101)]
while True:
    try:
        lst[int(input())]+=1
    except:
        break

m=max(lst)
for i in range(100):
    if m==lst[i]:
        print(i)

Python: # 0028
array = []
while True:
    try:
        a = input()
        if a == '': break
        array.append(int(a))
    except EOFError:
        break
count = list(map(lambda a: array.count(a), set(array)))
modes = list(array[i] for i, x in enumerate(count) if x == max(count))
print(*sorted(modes), sep = '\n')

Python: import sys
if __name__ == '__main__':
    a = [0]*101
    for tmp_line in sys.stdin:
        n = (int)(tmp_line)
        a[n-1] += 1
    b = [i+1 for i,x in enumerate(a) if x == max(a)]
    b.sort()
    for x in b:
        print(x)

Python: import sys
import collections


l = []
for line in sys.stdin:
    l.append(int(line))
counted = collections.Counter(l).most_common()
maxv = counted[0][1]
for k, v in counted:
    if v == maxv:
        print(k)