from collections import Counter


def main():

    N = int(input())
    lst = []

    for _ in range(N):
        lst.extend(input().split())

    c = dict(Counter(lst))


    for i in ["AC", "WA", "TLE", "RE"]:
        c.setdefault(i, 0)
        print(f"{i} × {c[i]}")


if __name__ == '__main__':
    main()
