• + 0 comments
    # Enter your code here. Read input from STDIN. Print output to STDOUT
    from collections import Counter
    words = [input().strip() for _ in range(int(input()))]
    count = Counter(words)
    print (len(count))
    print (" ".join(map(str,count.values())))``