Problem:


Mode Value

Your task is to write a program which reads a sequence of integers and prints mode values of the sequence.
The mode value is the element which occurs most frequently. 

Input

A sequence of integers ai (1 ≤ ai ≤ 100). The number of integers is less than or equals to 100.

Output

Print the mode values. If there are several mode values, print them in ascending order.

Sample Input

5
6
3
5
8
7
5
3
9
7
3
4

Output for the Sample Input

3
5

For example, 3 and 5 respectively occur three times, 7 occurs two times, and others occur only one. So, the mode values are 3 and 5.



Sample input:
5
6
3
5
8
7
5
3
9
7
3
4


Sample output:
3
5

Submission status: Accepted

Solution code:
# 0028
import collections
array = [0]*100
i = 0
while True:
    try:
        a = input()
        array[i] = int(a)
        i += 1
    except EOFError:
        break
array = filter(lambda a: a != 0, array)
counter = collections.Counter(array).most_common()
for a, count in counter:
    if count < counter[0][1]: break
    print(a)

Submission status: Accepted

Solution code:
# 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')

Submission status: Accepted

Solution code:
# 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 = list(filter(lambda a: array.count(a) == max(count), set(array)))
print(*modes, sep = '\n')

Submission status: Accepted

Solution code:
# 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), set(array))))
for a in sorted(s):
    if array.count(a) == mx:
        print(a)

Submission status: Accepted

Solution code:
# 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)))
for a in sorted(s):
    if array.count(a) == mx:
        print(a)

Submission status: Accepted

Solution code:
# 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)

Submission status: Accepted

Solution code:
# 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)))
modes = list(filter(lambda a: array.count(a) == mx, sorted(s)))
print(*modes, sep = '\n')

Submission status: Accepted

Solution code:
# 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')

Submission status: Accepted

Solution code:
# 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')

Submission status: Accepted

Solution code:
# 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)

Submission status: Accepted

Solution code:
# 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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
if __name__ == '__main__':
    a = [0]*101
    for tmp_line in sys.stdin:
        n = (int)(tmp_line)
        a[n-1] += 1
    b = [i+1 for i,x in enumerate(a) if x == max(a)]
    b.sort()
    for x in b:
        print(x)

Submission status: Accepted

Solution code:
num = [0] * 100
mode = 0
while True:
    try:
        a = int(input())
        num[a-1] += 1
        if num[a-1] > mode:
            mode = num[a-1]
    except:
        break
for i, n in enumerate(num):
    if n == mode:
        print(i+1)

Submission status: Accepted

Solution code:
seisuu = [0] * 100
try:
    while True:
        a = input()
        seisuu[a] += 1
except:
    b = max(seisuu)
    for i in range(100):
        if b == seisuu[i]:
            print i

Submission status: Accepted

Solution code:
lis=[0 for i in range(100)]
while True:
    try:
        x= int(input())
        lis[x-1]+=1
    except :
        break
ma=max(lis)
for i in range(100):
    if ma==lis[i]:
        print(i+1)

Submission status: Accepted

Solution code:
from sys import stdin
from collections import Counter
data = Counter([i for i in range(1, 101)])
for line in stdin:
    data[int(line.replace('\n', ''))] += 1
mode = data.most_common(1)[0][1]

for po in range(1, 101):
    if data[po] == mode:
        print(po)
    else:
        pass

Submission status: Accepted

Solution code:
import sys

d = {i:0 for i in range(1,101)}
for i in map(int, sys.stdin):
    d[i] += 1
s = sorted(d.items(), key=lambda x: x[1], reverse=True)
m = s[0][1]
for i in s:
    if i[1] < m:
        break
    print(i[0])

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
def main():
    Array = [0]*100
    while True:
        try:
            Array[int(input())-1] += 1
        except EOFError:
            break
    [print(i+1) for i in range(100) if Array[i] == max(Array)] 
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

l = []
for input in sys.stdin:
    l.append(int(input))

l = sorted(l)
d = {}
for i in range(0,len(l)):
    d[l[i]] = l.count(l[i])
max = 0
for key,value in d.items():
    if(value > max):
        max = value
for key,value in d.items():
    if(value == max):
        print key

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
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")

Submission status: Accepted

Solution code:
count = [0 for i in range(100)]
while True:
    try:
        count[int(input()) - 1] += 1
    except:
        break
max_e = 0
max_i = []
for i in range(100):
    temp = max_e
    max_e = max(count[i], max_e)
    if temp == max_e and count[i] == max_e:
        max_i.append(i + 1)
    elif temp != max_e:
        max_i = [i + 1]
for i in max_i:
    print(i)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())
maxi = 0
nums = [0 for i in range(101)]
for l in range(len(N)):
    k = int(N[l])
    nums[int(N[l])] += 1
    maxi = max(maxi, nums[k])

for i in range(101):
    if nums[i] == maxi:
        print(i)

Submission status: Accepted

Solution code:
import sys
a={}
for i in sys.stdin:
 a.setdefault(i,0);a[i]+=1
for k in a:
 if a[k]==max(a.values()):print(k.strip())

Submission status: Accepted

Solution code:
import sys
a={}
for i in sys.stdin:a.setdefault(i,0);a[i]+=1
for k in a:
 if a[k]==max(a.values()):print(k.strip())

Submission status: Accepted

Solution code:
import sys
a={}
for i in sys.stdin:a.setdefault(i,0);a[i]+=1
[print(k.strip())for k in a if a[k]==max(a.values())]

Submission status: Accepted

Solution code:
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)]

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

d = {}
for line in sys.stdin:
    s = line.strip()
    if not s in d: 
        d[s] = 1
    else:
        d[s] += 1

max_num = max(d.values())

ans = [int(key) for key, value in d.items() if value == max_num]
for i in sorted(ans):
    print(i)

Submission status: Accepted

Solution code:
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)]

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
import sys
s ,v = [], []
for e in sys.stdin:
    try:
        v[s.index(int(e))] += 1
    except:
        s.append(int(e))
        v.append(1)
c = list(zip(s, v))
c.sort()
c.sort(key = lambda x: x[1], reverse = True)
for i in c:
    if i[1] == c[0][1]:print(i[0])
    else:break

Submission status: Accepted

Solution code:
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]

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# AOJ 0028 Mode Value
# Python3 2018.6.13 bal4u

import sys

cnt = [0 for i in range(101)]
max = 0
for _ in sys.stdin:
	i = int(_)
	cnt[i] += 1
	if cnt[i] > max:
		max = cnt[i]
for i in range(101):
	if cnt[i] == max:
		print(i)

Submission status: Accepted

Solution code:
# AOJ 0028 Mode Value
# Python3 2018.6.13 bal4u

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)

Submission status: Accepted

Solution code:
lst = [0]*100
while True:
    try:
        n = input()
    except EOFError:
        break
    lst[n-1] += 1
M = max(lst)
for i in range(0,100):
    if lst[i] == M:
        print i+1

Submission status: Accepted

Solution code:
import sys

dictionary = dict()

for line in sys.stdin.readlines():
    line = line.strip()
    num = int(line)
    if not dictionary.has_key(num):
        dictionary[num] = 0
    dictionary[num] += 1

lastValue = max(dictionary.values())
for key, value in sorted(dictionary.items(), key=lambda x: x[1], reverse=True):
    if value == lastValue:
        print key

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

import sys
import random


def main():
    lines = sys.stdin.readlines()
    nums = [int(line.replace("\n", "")) for line in lines if line != "\n"]
    num_set = [i for i in set(nums)]
    num_set.sort(lambda a, b: cmp(nums.count(a), nums.count(b)))
    maximum = nums.count(num_set[-1])
    for num in num_set:
        if nums.count(num) == maximum:
            print num

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
list=[0]*101
for line in sys.stdin.readlines():
    list[int(line.strip())]+=1
ma=max(list)
for i,v in enumerate(list):
    if v==ma:print i

Submission status: Accepted

Solution code:
l = []
c = list([0] * 100)
while True:
    try:
        c[int(raw_input()) - 1] += 1
    except:
        break
m = max(c)
for i in xrange(c.count(m)):
    j = c.index(m)
    print j + 1
    c[j] = 0

Submission status: Accepted

Solution code:
import sys
m={}
for line in sys.stdin.readlines():
    p=int(line.rstrip())
    m.setdefault(p,0)
    m[p]+=1

x=sorted(m.items(),key=lambda x:x[1],reverse=True)
tmp=x[0][1]
ans=[v for v,k in x if tmp == k]
for l in ans:
    print l

Submission status: Accepted

Solution code:
from __future__ import (absolute_import, division, print_function,
                        unicode_literals)
from sys import stdin
from collections import Counter
from itertools import takewhile
from operator import itemgetter

counter = Counter()
for line in stdin:
    if not line.split():
        break
    counter[int(line)] += 1

v = counter.most_common(1)[0][1]
mc = takewhile(lambda x: v == x[1], counter.most_common(100))
for n, _ in sorted(mc, key=itemgetter(0)):
    print(n)

Submission status: Accepted

Solution code:
a={}
while True:
    try:
        t=input()
        a[t] = 0 if t not in a else a[t]+1
    except EOFError:
        q=[j for i,j in enumerate(a) if a.values()[i] == max(a.values())]
        for i in sorted(q): print i
        break

Submission status: Accepted

Solution code:

import sys


h = {}
for i in range(1, 101):
    h[i] = 0


#input_file = open(sys.argv[1], 'r')

for line in sys.stdin:
    n = int(line)
    h[n] += 1

m = max(h.values())
for i in range(1, 101):
    if h[i] == m:
        print i
    else:
        pass

Submission status: Accepted

Solution code:
list = [0]
for i in range(100):
    list.append(0)

m = 0

while True:
    try:
        a = int(raw_input())
        list[a] += 1
        #print a,list[a]                                                                                

        if list[a] > m:
            m = list[a]

    except EOFError:
        break

for i in range(100):
    if list[i] == m:
        print i

Submission status: Accepted

Solution code:
d=[0 for i in range(101)]

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

for e in [i for i,e in enumerate(d) if e==max(d)]:
    print e

Submission status: Accepted

Solution code:
d=[0]*101

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

tmp=max(d)
for i in range(101):
    if d[i]==tmp: print i

Submission status: Accepted

Solution code:
a = {}
while True:
    try:
        n = int(raw_input())
        if n not in a:
            a[n] = 0
        a[n] += 1
    except EOFError:
        break
a = sorted(a.items(), key=lambda x:x[1], reverse = True)
for s in [k for k,v in a if v == a[0][1]]:
    print s

Submission status: Accepted

Solution code:
import sys

group = {}

for line in sys.stdin:
    n = int(line)
    if n in group:
        group[n] += 1
    else:
        group[n] = 1

sorted_group = sorted(group.items(), key=lambda x: x[1])
sorted_group.reverse()

mx = 0
result = []
for k,v in sorted_group:
    if mx == 0:
        mx = v
    if v == mx:
        result.append(k)
    else:
        break

result.sort()

for i in result:
    print(i)

Submission status: Accepted

Solution code:
a = []
s=[0 for i in range(100)]
while True:
    try:
        a.append(int(raw_input()))
    except:
        break
for i in range(100):
    s[i] = a.count(i+1)

mx = max(s)
smx = []
for i in range(100):
    if s[i] == mx:
        smx.append(i+1)
smx.sort()

for i in smx:
    print i

Submission status: Accepted

Solution code:
import sys
n = 101
D = [0]*n

for s in sys.stdin: D[int(s)] += 1
tmp = max(D)
i = 0
for e in D:
    if e==tmp: print i
    i += 1

Submission status: Accepted

Solution code:
nums = []
val = []
ans = []

while True:
	try:
		nums.append(int(raw_input()))
	except EOFError:
		num_list = sorted(list(set(nums)))
		for n in num_list:
			val.append(nums.count(n))
		ans.append(num_list[val.index(max(val))])
		tmp = max(val)
		val.remove(max(val))
		num_list.pop(val.index(tmp))
		while max(val) == tmp:
			ans.append(num_list[val.index(max(val))])
			num_list.pop(val.index(tmp))
			val.remove(max(val))
		for s in ans:
			print s
		break

Submission status: Accepted

Solution code:
from collections import Counter
c = Counter()
while 1:
    try:
        c[input()] += 1
    except:
        break
L = sorted(c.items(), key=lambda a:(-a[1], a[0]))
mx = L[0][1]
for x in L:
    if x[1] == mx:
        print x[0]
    else:
        break

Submission status: Accepted

Solution code:
try:
    a = [0] * 101
    while True:
        a[int(raw_input())] += 1
except:
    pass
mx = max(a)
for i in range(len(a)):
    if a[i] == mx:
        print i

Submission status: Accepted

Solution code:
import sys
count={}
for line in sys.stdin.readlines():
	n=int(line.rstrip())
	if not count.has_key(n):
		count[n]=0
	count[n]+=1

max=max(count.values())
for k,v in sorted(count.items()):
	if v==max:
		print k

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
a=[0]*100
while True:
	try:
		a[int(input())]+=1
	except:
		break

for i in range(100):
	if a[i]==max(a):
		print(i)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
s=[0]*101
i=0
try:
    while True:
        n=int(input())
        s[n]+=1
except EOFError:
    pass

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)]

Submission status: Accepted

Solution code:


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]

Submission status: Accepted

Solution code:

a = [0]*101

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

    except EOFError:
        break

k = max(a)
for i in range(100):
    if a[i] == k:
        print(i)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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]

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
a = list([0] * 100)

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

Submission status: Accepted

Solution code:
# 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)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
#(50)最頻値

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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = [0] * 100

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

v = max(a)
for i in range(100):
    if v == a[i]:
        print(i)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

counts = [0] * 101
# counts[n] nの個数と数える

for n in a:
    counts[n] += 1

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
 
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)

Submission status: Accepted

Solution code:
x = []
try:
    while True:
        n = int(input())
        x.append(n)
except EOFError:
    pass

counts = [0]*101

for n in x:
    counts[n]+=1

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
lst=[]
while True:  
    try:
        n=int(input())
        lst.append(n)
    except EOFError:
        break
        continue
import collections
c = collections.Counter(lst)  
freqCheck = c.most_common()
mode =[freqCheck[0][0]]
maxCount = freqCheck[0][1] 
count = 1
while maxCount == freqCheck[count][1]:
    mode.append(freqCheck[count][0])
    count = count + 1
mode.sort()
for i in mode:
    print(i)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
list=[]
try:
    while True:
        list.append(int(input()))
except EOFError:
    pass


count=[0]*101
for n in list:
    count[n]+=1



for n in range(len(list)):
    if count[n]==max(count):
        print(n)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
l=[0]*101
while True:
    try:
        i=int(input())
        l[i]+=1
    except:
        break
M=max(l)
for j in range(1,101):
    if l[j]==M:
        print(j)
    else:
        pass

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)