#45605: python


isu11103023A (omomg)

學校 : 義守大學
編號 : 282765
來源 : [42.75.53.188]
最後登入時間 :
2025-03-24 22:56:37
c044. 10008 - What's Cryptanalysis -- UVa10008 | From: [42.74.129.230] | 發表日期 : 2025-03-21 21:41

n=int(input())
dict={}
for i in range(n):
   s=input().strip()
   for w in s:
      if w.isalpha(): 
         w = w.upper()
         if w in dict:
           dict[w]+=1
         else:
           dict[w]=1
f=sorted(dict,key=lambda x:(-dict[x],x))
for i in f:
  print(f"{i} {dict[i]}")

 
ZeroJudge Forum