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: # 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(*sorted(modes), sep = '\n')

Python: #0028
import collections
a = list()
for i in range(100):
    try:
        a.append(int(input()))
    except:
        break
x = collections.Counter(a).most_common()[0][1]
z = collections.Counter(a).most_common()[0][0]

l = []

for j in range(len(collections.Counter(a).most_common())):
    y = collections.Counter(a).most_common()[j][1]
    v = collections.Counter(a).most_common()[j][0]
    if x == y:
        l.append(v)
    else:
        break
l.sort()
for k in range(len(l)):
    print(l[k])

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: d={}
try:
    while True:
        n=int(input())
        if n in d:
            d[n]+=1
        else:
            d[n]=1
except EOFError:
    pass
a=[]
m=max(d.value())
for key, value in d:
    if value == m:
        a.append(key)
a.sort()
for i in a:
    print(i)

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
from collections import Counter
list=[]
while True:
    try:
        s = int(input())
        list.append(s)
    except:
        break
c=Counter(list)
mode=c.most_common()
print(mode[0][0])
max=mode[0][1]
i=1
while True:
    if max==mode[i][1]:
        max=mode[i][1]
        print(mode[i][0])
        i+=1
    else:
        break

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(int(key))
mostlist.sort()
for item in mostlist:
	print(item)

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

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

Python: # 0028
array = []*100
i = 0
while True:
    try:
        a = input()
        array[i] = int(a)
        i += 1
    except EOFError:
        break
s = set(array)
mx = max(list(map(lambda a: array.count(a), s)))
modes = list(filter(lambda a: array.count(a) == mx, sorted(s)))
print(*modes, sep = '\n')

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

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

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

Python: import sys,collections
l=[int(t) for t in sys.stdin]
m=sorted(collections.Counter(l).values())[-1]
[print(i[0]) for i in sorted(collections.Counter(l).items(),key=lambda x:x[0]) if i[1]==m]

Python: import sys

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

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

for i in range(len(count)):
    if count[i] > mode[0]:
        mode.clear()
        mode.append(i+1)
    elif count[i] == mode[0]:
        mode.append(i+1)

for i in mode:
    print(i)

Python: d={}
try:
    while True:
        n=int(input())
        if n in d:
            d[n]+=1
        else:
            d[n]=1
except EOFError:
    pass
a=[]
m=max(d.values())
for key, value in d.items():
    if value == m:
        a.append(key)
a.sort()
for i in a:
    print(i)

Python: s=[0]*101
while True:
    try:
        t=int(input())
        s[t]+=1
    except: 
        break

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

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

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


def solve(d):
    l = []
    _max = max(d.values())
    for k, v in sorted(d.items()):
        if _max == v:
            l.append(k)
    print('\n'.join(str(e) for e in l), end='')

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

    solve(DICT)

Python: import sys

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

d = [a.count(i) for i in range(1, 101)]
m = max(d)
for i in range(100):
    if d[i] == m: print(i + 1)

Python: a=[]
while True:
    try:
        a.append(input())
    except:
        break
n=len(a)
m=[0 for i in range(101)]
l=0
for j in range(n):
    k=int(a[j])
    m[k]+=1
    l=max(l,m[k])
    
for i in range(101):
    if m[i]==l:
        print(i)

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

Python: from collections import defaultdict as dd
a=dd(int)
freq=0
while True:
    try:
        b=int(input())
    except:
        break
    a[b]+=1
    if freq<a[b]:
        freq=a[b]
ans=sorted([i for i,j in a.items() if j==freq])
for i in ans:
    print(i)

Python: import sys

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

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

Python: if __name__ == '__main__':

	ans = dict()
	while True:
		try:
			n = int(input())

			if n not in ans:
				ans[n] = 1
			else:
				ans[n] += 1

		except EOFError:
			break


	a = max(ans.values())

	A = []
	for d in ans:
		if ans[d] == a:
			A.append(d)

	B = sorted(A)
	for i in B:
		print(i)

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

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