Help for chef learn statistics

this is code for chef learns statistics in python3.6. I have tried every input possible and answer shown is right. but when i submit practice my code,codedhef tells that it gives wrong answer. please help me with code and kindly tell the error

for _ in range(int(input())):
n=int(input())
a=list(map(int,input().split()))
d={}
for i in range(len(a)):
c=a.count(a[i])
d.update({a[i]:c})
for i in d:
print(i,d[i],sep=’:’)