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 a i (1 ≤ a i ≤ 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.

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

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

Solution (Python):

import sys


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




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

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

m = 0

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

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

    except EOFError:
        break

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (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]

Solution (Python):

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)

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

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

Solution (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]

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

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

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

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

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

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

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

Solution (Python):


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)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):



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]

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

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

Solution (Python):
lst=[0]*101
while True:
    try:
        x=int(input())
        lst[x]+=1
    except:
        break
ans=max(lst)
for i in range(101):
    if lst[i] == ans:
        print(i)

Solution (Python):
a = [0 for i in range(101)]  
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)

Solution (Python):
a=[]
c=[]
while True:
    try:
        a.append(int(input()))
    except:
        break
x=len(a)
for i in range(x):
    b=a.count(i)
    c.append(b)
r=max(c)
e=len([i for i,x in enumerate(c) if x==r])
d=[i for i,x in enumerate(c) if x==r]
for i in range(e):
    print(d[i])

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

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

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

Solution (Python):
x=[0]*100
while True:
    try:
        y=int(input())
        x[y-1]+=1
    except:
        break
z=max(x)
for i in range(100):
   if x[i] == z:
      print(i+1)

Solution (Python):
a={}
maxnum = 1
while True:
    try:
        ai = int(input())
        if ai not in a:
            a[ai] = 1
        else:
            a[ai] += 1
            if maxnum < a[ai]:
                maxnum = a[ai]
    except:
        break
b = sorted(a.items())
for key, value in b:
    if maxnum==value:
        print(key)

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

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

Solution (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

Solution (Python):
import collections

S = []
while True:
    try:
        s = int(input())
        S.append(s)
    except EOFError:
        break

c = collections.Counter(S)
k = 0
a = []

if len(S) == 0:
    pass
else:
    for i in range(len(c)):
        if c.most_common()[i][1] == c.most_common()[i+1][1]:
            k += 1
        else:
            break
    for i in range(k+1):
        a.append(c.most_common()[i][0])
        a.sort()

    for i in range(len(a)):
        print(a[i])

Solution (Python):
from collections import Counter
l = []
while True:
    try:
        a=int(input())
    except EOFError:
        break
    l.append(a)
L = sorted(l)
def calculate_mode(L):
    c = Counter(L)
    freq_scores = c.most_common()
    max_count = freq_scores[0][1]

    modes = []

    for num in freq_scores:
        if num[1] == max_count:
            modes.append(num[0])
    return(modes)

if __name__ == '__main__':
    data = L
    modes = calculate_mode(L)

    for mode in modes:
        print(mode)

Solution (Python):
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 j in range(len(n)):
    k = int(n[j])
    nums[int(n[j])] += 1
    maxi = max(maxi, nums[k])

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

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

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

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

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

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

Solution (Python):
x=[]
y=[]
z=[]
while True:
    try:
        n=int(input())
        x.append(n)
    except EOFError:
        break
    
Counter = [0] * 101

for n in x:
    Counter[n] += 1
    y.append(Counter[n])

    



y_len=len(y)
for i in range(y_len):

    if y[i]==max(y):

        z.append(x[i])

z.sort()
z_len=len(z)
for i in range(z_len):
    print(z[i])

Solution (Python):
import collections
a = []
while True:
    try:
        n = int(input())
    except EOFError:
        break
    a.append(n)
    
if len(a) != 0:
    b = collections.Counter(a)
    c = b.most_common()
    x = c[0][1]
    d = []
    for elem in c:
        if elem[1] == x:
            d.append(elem[0])
        else:
            break
    d.sort()
    [print(k) for k in d]

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

Solution (Python):


import collections
collections.Counter

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

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

Solution (Python):
lst = [0 for i in range(1,101)]
while True:
    try:
        lst[int(input())]+=1
    except:
        break

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

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

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

Solution (Python):
import sys

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

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

Solution (Python):
from collections import Counter
l=[0]*100

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

Solution (Python):
a=[]
while True:
    try:
        x=int(input())
        a.append(x)
    except:
        break
b=[]
for i in range(1,101):
    y=a.count(i)
    b.append(y)
c=[j for j, v in enumerate(b) if v == max(b)]
e=len(c)
for h in range(e):
    print(c[h]+1)

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

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

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

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

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

Solution (Python):
import sys

A = [i+1 for i in range(100)]
B = [0 for i in range(100)]

a = [0 for i in range(100)]

for l in sys.stdin:
    a.append(int(l))




for x in a:
    if x in A:
        B[x-1] += 1

max = max(B)

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

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

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

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