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

Python: a, md = [], []
c, mx = 1, 1
while True:
    try:
        a.append(int(input()))
    except EOFError:
        break
a = sorted(a)
print(a)
for i in range(0, len(a) - 1):
    if a[i] == a[i + 1]:
        c += 1
    else:
        c = 1
    if mx < c:
        mx = c
        md = [a[i]]
    elif mx == c:
        md.append(a[i])
print('\n'.join(map(str, sorted(md))))

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 = [array[i] for i, x in enumerate(count) if x == max(count)]
print(*sorted(modes), sep = '\n')

Python: A=[]
B=[]
C=[]
while True:
  try:
    A.append(int(input()))
  except EOFError:
    break
    
for i in range(len(A)):
  count=0
  for j in range(len(A)):
    if A[i]==A[j]:
      count+=1
  B.append(count)
maxb=max(B)
for i in range(len(A)):
  if B[i]==maxb:
    if A[i] in C:
      pass
    else:
      C.append(A[i])
C.sort()
for i in range(len(C)):
  print(C[i])

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: import sys

data = [0] * 101

for line in sys.stdin:
  try:
    n = int(line)
    data[n] += 1
  except:
    break
m = max(data)
for i in range(len(data)):
  if data[i] == m:
    print(i)

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: 

import sys
a=[]
for i in sys.stdin:
    a.append(int(i))
    
import collections
counted = collections.Counter(a)

m = max(counted.values())

chars = [key for key, value in counted.items()
             if value == m]
             
x=sorted(chars)
[print(i) for i in x]

Python: # coding: utf-8
# Your code here!
a=[]
try:
    while True:
        a.append(int(input()))
except EOFError:
    pass
b=[0]*101

for i in a:
    b[i]+=1
c=max(b)

for i in range(100):
    if b[i]==c:
        print(i)

Python: from collections import Counter
import sys

lines = []
for line in sys.stdin:
    lines.append(int(line.strip()))

c = Counter(lines)
m = c.most_common(1)[0][1]
for k in sorted(c.keys()):
    if c[k]==m:
        print(k)

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

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

Python: numdict = dict()
while True:
	try:
		num = input()
		if num not in numdict:
			numdict[num] = 0
		else:
			numdict[num] += 1
	except EOFError:
		break
most = max(numdict.values())
mostlist = list()
for key in numdict:
	if most == numdict[key]:
		mostlist.append(key)
mostlist.sort()
for item in mostlist:
	print(item)

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(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: #nの中にaを入れる
    counts[n] +=1


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

Python: num_list = [0 for i in range(101)]


try:
    while True:
        num_list[int(input())] += 1
except EOFError:
    

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

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

DICT = {k: 0 for k in range(0, 10)}

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

tmp = None
for k, v in DICT.items():
    if v != tmp:
        break

    print(k)

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]