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: data = [0 for _ in range(100)]

while True:
  try:
    input_data = int(input())
  except EOFError:
    break
  data[input_data-1] += 1

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

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

counts=[0]*101

for n in a:
    counts[n] +=1
    #print(n)

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

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

Python: a = [0 for i in range(101)]  #101個の0がリストに入ってる
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=[]
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.sort()
for i in B:
	print(i)

Python: from collections import Counter

dic = Counter()

while True:
  try:
    dic[int(input())] += 1

  except EOFError:
    break

lst = dic.most_common()
max_value = lst[0][1]
mode_values = [t[0] for t in lst if t[1] == max_value]
mode_values.sort()

for v in mode_values:
  print(v)

Python: count_map = {}
while True:
    try:
        i = int(input())
        if i in count_map:
            count_map[i] += 1
        else:
            count_map[i] = 1
    except EOFError:
        break
max_count = max(count_map.values())
mode_values = []
for item in count_map.items():
    if item[1] == max_count:
        mode_values.append(item[0])
for mode in sorted(mode_values):
    print(mode)

Python: x=[0]*101
while True :
    try :
        n=int(input())
        x[n]+=1
    except EOFError: break

for i in range(sum(x)):
    if x[i]==max(x) :
        print(i)

Python: # 0028
import collections
array = []
i = 0
while True:
    try:
        array.append(int(input()))
        i += 1
    except ValueError:
        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: 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: 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: # coding: utf-8
# 50
import collections

S = list()
for i in range(100):
    try:
        S.append(int(input()))
    except:
        break

A = list()

for j in range(len(collections.Counter(S).most_common())):
    if collections.Counter(S).most_common()[0][1] == collections.Counter(S).most_common()[j][1]:
        A.append(collections.Counter(S).most_common()[j][0])
A.sort()       
for z in range(len(A)):
    print(A[z])

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

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 range(0,101):
        if mode[i]==maxN:
            print(i)
            
ModeValue()

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

Python: import collections as co
a = []
while True:
    try:
        n = int(input())
    except:
        break
    a.append(n)
b = co.Counter(a)
c = b.most_common()
N = c[0][1]
maxs =[]
for c2 in c:
    if c2[1] == N:
        maxs.append(c2[0])
    maxs.sort()
d = len(maxs)
for j in range(d):
    print(maxs[j])

Python: import sys
from collections import defaultdict
d = defaultdict(int)
for i in sys.stdin:
    d[i] +=1
m = max(v for v in d.values())
for _ in sorted([k for k, v in d.items() if v == m]):
    print(_)

Python: import sys
from collections import defaultdict
d = defaultdict(int)
for i in sys.stdin:
    d[int(i)] +=1
m = max(v for v in d.values())
for i in sorted([k for k, v in d.items() if v == m]):
    print(i)

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

num=[]
for i in range(101):
	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.sort()
for i in B:
	print(i)

Python: import sys
a = {}
ma = 0
m = []
for u in sys.stdin:
    i = int(u)
    if not (i in a):
        a[i] = 1
    else:
        a[i] += 1
    # ???????????§????????±???
    if ma <= a[i]:
        if ma < a[i]:
            ma = a[i]
            m.clear()
        m.append(i)
m = sorted(m)
for k in m:
    print(k)

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 = []
while True:
    try:
        a.append(int(input()))
    except:
        break
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: 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
 
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: 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: # Aizu Problem 0028: Mode Value
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


counts = {}
while True:
    try:
        a = int(input())
    except EOFError:
        break
    counts[a] = counts.get(a, 0) + 1

for a in sorted([a for a in counts if counts[a] == max(counts.values())]):
    print(a)

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