while True:
try:
a = list(input())
except:
break
mx = 0
while(len(a)!=0):
b = a[0]
cnt = 0
while(b in a):
a.remove(b)
cnt += 1
if(cnt > mx):
mx = cnt
mx_t = b
print(mx_t, mx)
抱歉,誤會題目了