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

d={}
mode=0

while True:
  n = sys.stdin.readline()
  if not n: break
  n = int(n)
  if d.has_key(n):
    d[n] = d[n]+1
  else:
    d[n] = 1
  if mode < d[n]:
    mode = d[n]

for k in d.keys():
  if d[k] == mode:
    print(k)

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: memo, max_value = {}, 0
while True :
    try :
        temp = input()
        if temp in memo : memo[temp] = memo[temp] + 1
        else : memo[temp] = 1
        if max_value < memo[temp] : max_value = memo[temp]
    except : break
for result, value in memo.items() :
    if max_value == value : print(result)

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

Python: import sys

arr = []
for i in range(101):
    arr.append(0)
    
maxi = 0

for e in sys.stdin:
    arr[int(e)] += 1
    maxi = max(maxi, arr[int(e)])
    
for i in range(101):
    if arr[i] == maxi:
        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: import sys
cnt = [0]*101
while True:
  try:
    cnt[int(input())] +=1
  except EOFError:
    break
m = max(cnt)

for i in range(101):
  if cnt[i] == m:
    print(i)

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

Python: kosu = [0] * 100
k = 1
while True:
    try:
        n = int(input())
        kosu[n - 1] += 1
    except (EOFError,ValueError):
        ma = max(kosu)
        num = kosu.index(ma) + k
        print(num)
        
        
        kosu.remove(max(kosu))
        while True:
            if ma > max(kosu):
                break
            k += 1
            num = kosu.index(ma) + k
            kosu.remove(max(kosu))
            print(num)

Python: 
import sys

if __name__ == '__main__':

    nums = []
    piles = [0 for i in range(0,101)]

    for n in sys.stdin:
        if n == "\n":
            break
        else :
            nums.append(int(n))

    for n in nums:
        piles[n] += 1


    maxnum = 0
    for p in piles:
        if maxnum < p:
            maxnum = p

    for i,p in enumerate(piles):
        if maxnum == p:
            print(i)

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: # coding: utf-8
# Your code here!

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

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: kosu = [0] * 100
k = 1
while True:
    try:
        n = int(input())
        kosu[n - 1] += 1
    except (EOFError,ValueError):
        ma = max(kosu)
        num = kosu.index(ma) + k
        print(num)
        
        
        kosu.remove(max(kosu))
        while True:
            if ma > max(kosu):
                break
            k += 1
            num = kosu.index(ma) + k
            kosu.remove(max(kosu))
            print(num)
        break

Python: import sys
readlines = sys.stdin.readlines
write = sys.stdout.write
def solve():
    mp = {}
    for line in readlines():
        v = int(line)
        mp[v] = mp.get(v, 0) + 1
    ma = max(mp.values())
    ans = [k for k, v in mp.items() if v == ma]
    ans.sort()
    write("\n".join(map(str, ans)))
    write("\n")
solve()

Python: y=[0]*100
while True:
    try:
        y[int(input())-1]+=1
    except:
        break
    
flag=False
for i in range(100)[::-1]:
    if flag:
        exit()
    for j in range(100):
        if y[j]==i:
            flag=True
            print(j+1)

Python: import sys

def solve():
    A = [0 for _ in range(101)]
    for i in sys.stdin:
        a = int(i)
        A[a] += 1
    
    M = max(A)
    for i, a in enumerate(A):
        if a == M:
            print(i)

if __name__ == "__main__":
    solve()

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
import collections
array = [0]*100
i = 0
while True:
    try:
        array[i] = int(input())
        i += 1
    except EOFError:
        break
array = filter(lambda a: a != 0, array)
max = max(array.count())
print(filter(lambda a: array.count(a) == max, array), sep = '\n')

Python: import sys
d = {i:0 for i in range(1, 101)}
for n in sys.stdin:
    if n == "\n":
        break
    else:
        d[int(n)] += 1
sort = sorted(d.items(), key=lambda x: x[1], reverse=True)
mode = sort[0]
for n in sort:
    if mode[1] == n[1]:
        print(n[0])

Python: # -*- coding:utf-8 -*-
import sys
array = []
for i in sys.stdin:
    array.append(int(i))

data = [0]*100
for i in range(len(array)):
    data[array[i]] += 1
    
m = [i for i,j in enumerate(data) if j == max(data)]
for i in range(len(m)):
    print(m[i])

Python: import sys
from itertools import dropwhile
a = []
try:
    for v in sys.stdin:
        a.append(int(v))

except:
    m = max([a.count(v) for v in set(a)])
    next(dropwhile(lambda x: True, (print(v) for v in set(a) if a.count(v) == m)))

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

Python: n=[0]*101
while 1:
	try:n[int(input())]+=1
	except:break
m_n=max(n)
for i in range(n.count(m_n)):
	print(n.index(m_n)+i)
	n.remove(m_n)

Python: import sys
l = []
max_c = 0
n = []
for i in sys.stdin.readlines():
  l.append(int(i))
  if l.count(int(i)) == max_c:
    n.append(int(i))
  elif l.count(int(i)) > max_c:
    n = [int(i)]
    max_c = l.count(int(i))
n.sort()
for i in n:
  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)