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: import sys
num_max = 0
frequency = [0] * 101
for line in sys.stdin:
    num = int(line)
    frequency[num] += 1
    num_max = max(num_max, frequency[num])
for i in range(len(frequency)):
    if num_max == frequency[i]:
        print(i)

Python: mode = []
count = [0 for i in range(100)]
while(1):
	try:
		n = int(input())
		count[n-1] = count[n-1] + 1
	except EOFError:
		max_ = max(count)
		for i in range(100):
			if count[i] == max_:
				mode.append(i+1)
		for i in mode:
			print(i)
		break

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

Python: a = []
for i in range(100):
    try:       
        n = int(input())
        a.append(n)
    except:    
        pass

M = 0
b = []
for i in range(100):
    bi = a.count(i)
    #print(bi)
    if bi == M:
        b.append(i)
        M = bi
    elif bi > M:
        b.clear()
        b.append(i)
        M = bi
for i in range(len(b)):
    print(b[i])

Python: numbers = [0 for i in range(100)]

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

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

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,c=[],[0]*101
while True:
    try:
        a.append(int(input()))
    except EOFError:
        break
for i in a:
    c[i]+=1
for i in range(len(a)):
    if c[i]==max(c):
        print(i)

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

Python: import sys
 
def ModeValue():
    mode=[0 for i in range(0,101)]
    
    for n in sys.stdin:
        mode[int(n)]+=1

    maxN=max(mode)

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

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

max=max(list)
for i in range(len(list)):
    if list[i]==max: print(i+1)

Python: import sys
from collections import Counter


if __name__ == '__main__':
    # ??????????????\???
    # data = [5, 6, 3, 5, 8, 7, 5, 3, 9, 7, 3, 4]
    data = []
    for line in sys.stdin:
        data.append(int(line.strip()))
    # print(data)

    # ?????????????¢????
    c = Counter(data)
    max_freq = c.most_common(1)[0][1]  # ???????????????????????°????¨???¶
    modes = []
    for val, freq in c.most_common():
        if freq != max_freq:
            break
        modes.append(val)

    # ???????????¨???
    modes.sort()
    for i in modes:
        print(i)

Python: from collections import Counter
a=Counter()
while True:
    try:
        a[int(input())]+=1
    except EOFError:
        break
b=a.most_common()
c=b[0][1]
d=[i[0] for i in b if i[1] == c]
d.sort()
for j in d:
    print(j)

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

import collections
import itertools
t=[]
while True:
    try:
        k=int(input())
        t.append(k)
    except EOFError:
        break
counter=collections.Counter(t)
mode_v=counter.most_common()[0][-1]
it=itertools.takewhile(lambda kv:kv[-1]==mode_v,counter.most_common())
m=(k for k,v in it)
[print(i) for i in m]

Python: 
import sys
def max(count):
   m = count[0]
   for i in range(1,len(count)):
       if count[i] > m:
           m = count[i]
   return m
list = []
count = []
mode = 0
for i in range(10):
   count.append(0)
   list.append('m')
for line in sys.stdin.readlines():
   num = int(line)
   if num not in list:
       list[num] = num
       count[num] = count[num] + 1
   else:
       count[num] = count[num] + 1
m = max(count)
for i in range(len(count)):
   if m == count[i]:
       print(list[i])

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: x = [0]*101
while True:
 try:
  n = int(input())
  x[n] += 1
 except:
  for i in range(101):
    if x[i] == max(x):
     print(i)
  break

Python: mode = []
count = [0 for i in range(100)]
while(1):
	try:
		n = int(input())
		count[n-1] = count[n-1] + 1
	except EOFError:
		max_ = max(count)
		for i in range(100):
			if count[i] == max_:
				mode.append(i+1)
		for i in mode:
			print(i)
		break

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

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

Python: ans = [0]*101
while True:
    try:
        ans[int(input())] += 1
    except EOFError:
        break
printqueue = []
maxi = max(ans)
for i in range(1,101):
    if ans[i] == maxi : printqueue.append(i)
for elm in printqueue:
    print(elm)

Python: from collections import Counter

c = Counter()

try:
    while 1:
        c[int(input())] += 1
except:
    pass

m = c.most_common(1)[0][1]
r = [n for n in c if c[n] == m]
r.sort()
for v in r:
    print(v)

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

Python: import sys

count = [0 for _ in range(101)]
mode = 0

for s in sys.stdin:
    x = int(s)
    count[x] += 1
    mode = max(mode, count[x])

for i in range(101):
    if count[i] == mode:
        print(i)

Python: a = {}

while True:
    try:
        a_i = int(input())
        if a_i in a:
            a[a_i] += 1
        else:
            a[a_i] = 1
    except:
        break

mode_count = max(a.values())

b = []
for key, value in a.items():
    if value == mode_count:
        b.append(key)

print(*sorted(b),sep="\n")

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

Python: from collections import Counter
a = []
while(True):
    try:
        a.append(int(input()))
    except:
        c = Counter(a)
        d = c.most_common()
        print("\n".join(str(e[0]) for e in d if e[1] == d[0][1]))
        break

Python: import sys
a=[0]*101
for i in sys.stdin:a[int(i)]+=1
[print(i)for i in range(101)if a[i]==max(a)]