Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.  The problem has N test cases.  For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is `AC`, `WA`, `TLE`, and `RE`, respectively.  See the Output section for the output format.
N = int(input())
List = ['AC', 'WA', 'TLE', 'RE']
List2 = []
for _ in range(N):
    S = input()
    List2.append(S)
result = dict((i, List2.count(i)) for i in List)
Set = set(List) - set(List2)
for key, value in result.items():
    print(key, "x", value)
for k in Set:
    print(k +"x 0")

n = int(input())
List = []
for _ in range(n):
    s = str(input())
    List.append(s)
print("AC x", List.count("AC"))
print("WA x", List.count("WA"))
print("TLE x", List.count("TLE"))
print("RE x", List.count("RE"))