• + 0 comments

    ` import sys

    from collections import Counter

    words = sys.stdin.read().splitlines()[1:]

    counter = Counter(words)

    print(len(counter))

    print( *counter.values())

    `