A=[0]*11**5 for t in range(int(input())): if t>1:RE() N=int(input()) print(A[N]) A[N]+=1