• + 0 comments

    from collections import Counter l=[] for i in range(int(input())): l.append(input()) print(len(Counter(l))) for i in Counter(l).values(): print(i,end=" ")