from decimal import *
def show_res(lst, dic):
lst.sort()
for num in lst:
print dic[num][1]+dic[num][0]
test=input()
while test:
noa=input()
dic={}
lst=[]
for i in range(0, noa):
my_acc=raw_input()
wos_my_acc=my_acc.replace(' ', '')
if wos_my_acc in dic.keys():
dic[wos_my_acc][0]+=1
else:
dic[wos_my_acc]=[0, my_acc]
lst.append(wos_my_acc)
show_res(lst, dic)
test-=1
can any on tell me? what is the error in the above code?