• + 0 comments
    n=int(input())
    a=[]
    for tt in range(n):
        t=input()
        a.append(t)
    from collections import Counter
    das=(Counter(a))
    print(len(Counter(a)))
    print(*das.values())