from collections import defaultdict
def main():
    N = int(input())
    c = defaultdict(int)

    for i in range(N):
        c[input()] += 1

    print("AC × {}".format(c["AC"]))
    print("WA × {}".format(c["WA"]))
    print("TLE × {}".format(c["TLE"]))
    print("RE × {}".format(c["RE"]))

if __name__ == "__main__":
    main()