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.

-----Constraints-----
 - 1 \leq N \leq 10^5
 - S_i is AC, WA, TLE, or RE.

-----Input-----
Input is given from Standard Input in the following format:
N
S_1
\vdots
S_N

-----Output-----
Let C_0, C_1, C_2, and C_3 be the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively. Print the following:
AC x C_0
WA x C_1
TLE x C_2
RE x C_3

-----Sample Input-----
6
AC
TLE
AC
AC
WA
TLE

-----Sample Output-----
AC x 3
WA x 1
TLE x 2
RE x 0

We have 3, 1, 2, and 0 test case(s) for which the verdict is AC, WA, TLE, and RE, respectively.

Difficulty: introductory

Starter code:

Solutions:
c = int(input())

r = ["AC", "WA", "TLE", "RE"]
a = { i:0 for i in r}

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

for rr in r:
    print(rr + " x " + str(a[rr]))

n = int(input())
l = []
for i in range(n):
  l.append(input().rstrip())
  
print('AC x ' + str(l.count('AC')))
print('WA x ' + str(l.count('WA')))
print('TLE x ' + str(l.count('TLE')))
print('RE x ' + str(l.count('RE')))

n = int(input())
l = []
for i in range(n):
    l.append(str(input()))
print(("AC x "+str(l.count('AC'))))
print(("WA x "+str(l.count('WA'))))
print(("TLE x "+str(l.count('TLE'))))
print(("RE x "+str(l.count('RE'))))



n = int(input())
AC,WA,TLE,RE = 0,0,0,0

for x in range(n):
    s = input()
    if s == 'AC':
        AC = AC + 1
    elif s == 'WA':
        WA = WA + 1
    elif s == 'TLE':
        TLE = TLE + 1
    elif s == 'RE':
        RE = RE + 1

print(('AC x ' + str(AC)))
print(('WA x ' + str(WA)))
print(('TLE x ' + str(TLE)))
print(('RE x ' + str(RE)))



n = int(input())
judge = ['AC', 'WA', 'TLE', 'RE']
cnt = [0] * 4
for _ in range(n):
    s = input()
    cnt[judge.index(s)] += 1
for i in range(4):
    print(judge[i], "x", cnt[i])

N=int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
    S=input()
    if S=='AC':
        AC+=1
    elif S=='WA':
        WA+=1
    elif S=='TLE':
        TLE+=1
    elif S=='RE':
        RE+=1

print('AC x ',AC)
print('WA x ',WA)
print('TLE x ',TLE)
print('RE x ',RE)

n = int(input())
ac = wa = tle = re = 0
for i in range(n):
    st = input()
    if st == 'AC':
        ac += 1
    elif st == 'WA':
        wa += 1
    elif st == 'TLE':
        tle += 1
    else:
        re += 1
print(f'AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}')


N = int(input())

C0 = 0
C1 = 0
C2 = 0
C3 = 0

for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 += 1
    elif Si == 'WA':
        C1 += 1
    elif Si == 'TLE':
        C2 += 1
    elif Si == 'RE':
        C3 += 1
print('AC x ' + str(C0))
print('WA x ' + str(C1))
print('TLE x ' + str(C2))
print('RE x ' + str(C3))

N = int(input())

d = {"AC":0,"WA":0,"TLE":0,"RE":0}
for _ in range(N):
  d[input()]+=1
for i,v in d.items():
  print(f"{i} x {v}")

n = int(input())
list = []
i = 1
while i <= n:
  list.append(input())
  i += 1
print('AC x ', list.count('AC'))
print('WA x ', list.count('WA'))
print('TLE x ', list.count('TLE'))
print('RE x ', list.count('RE'))

import sys


inputs = []
for input in sys.stdin:
    inputs.append(input.replace("\n", ""))

AC = 0
WA = 0
TLE = 0
RE = 0

for index, input in enumerate(inputs, 1):
    if input == "AC":
        AC += 1
    if input == "WA":
        WA += 1
    if input == "TLE":
        TLE += 1
    if input == "RE":
        RE += 1

print(("AC x " + str(AC) + "\nWA x " + str(WA) + "\nTLE x " + str(TLE) + "\nRE x " + str(RE)))


N = int(input())
D = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(N):
    D[input()] += 1
for x, y in list(D.items()):
    print(("{0} x {1}".format(x, y)))


N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  s = input()
  if(s=='AC'):
    AC+=1
  elif(s=='WA'):
    WA+=1
  elif(s=='TLE'):
    TLE+=1
  elif(s=='RE'):
    RE+=1

print('AC x '+str(AC))
print('WA x '+str(WA))
print('TLE x '+str(TLE))
print('RE x '+str(RE))

N = int(input())
C0 = C1 = C2 = C3 = 0

for i in range(N):
    S = str(input())
    if S == "AC":
        C0 += 1
    if S == "WA":
        C1 += 1
    if S == "TLE":
        C2 += 1
    if S == "RE":
        C3 += 1

C0 = str(C0)
C1 = str(C1)
C2 = str(C2)
C3 = str(C3)

print("AC x " + C0)
print("WA x " + C1)
print("TLE x " + C2)
print("RE x " + C3)

N = int(input())
AC, WA, TLE, RE = 0, 0, 0, 0
for i in range(N):
  S = input()
  if S == 'AC':
    AC += 1
  elif S == 'WA':
    WA += 1
  elif S == 'TLE':
    TLE += 1
  elif S == 'RE':
    RE += 1
print('AC x {}\nWA x {}\nTLE x {}\nRE x {}\n'.format(AC, WA, TLE, RE))

N = int(input())
S = [input() for i in range(N)]

nac = len([s for s in S if s == "AC"])
nwa = len([s for s in S if s == "WA"])
ntle = len([s for s in S if s == "TLE"])
nre = len([s for s in S if s == "RE"])

print(("AC x " + str(nac)))
print(("WA x " + str(nwa)))
print(("TLE x " + str(ntle)))
print(("RE x " + str(nre)))


dic = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
N = int(input())
for i in range(N):
  dic[input()] += 1
for i in dic:
  print(i, 'x', dic[i])

N = int(input())
S = ['' for i in range(N)]
for i in range(N):
  S[i] = str(input())

item = [0, 0, 0, 0]
rslt = ['AC', 'WA', 'TLE', 'RE']
for i in range(N):
  if S[i] == rslt[0]:
    item[0] += 1
  elif S[i] == rslt[1]:
    item[1] += 1
  elif S[i] == rslt[2]:
    item[2] += 1
  else:
    item[3] += 1

for i in range(4):
  print(rslt[i], 'x', item[i])

N = int(input())
result = ["AC","WA","TLE","RE"]
S = [input() for i in range(N)]

for i in result:
    print(i,"x",S.count(i))

n = int(input())
d = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(n):
  s = input()
  d[s] += 1
print("AC x", d["AC"])
print("WA x", d["WA"])
print("TLE x", d["TLE"])
print("RE x", d["RE"])

n = int(input())
judge_list = [input() for i in range(n)]

ac_n = judge_list.count('AC')
tle_n = judge_list.count('TLE')
wa_n = judge_list.count('WA')
re_n = judge_list.count('RE')

print(f'AC x {ac_n}')
print(f'WA x {wa_n}')
print(f'TLE x {tle_n}')
print(f'RE x {re_n}')


N = int(input())
S = [input() for i in range(N)]

print("AC x",S.count("AC"))
print("WA x",S.count("WA"))
print("TLE x",S.count("TLE"))
print("RE x",S.count("RE"))

N = int(input())
result = []
for i in range(N):
    r = input()
    result.append(r)
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    if result[i] == 'AC':
        AC += 1
    if result[i] == 'WA':
        WA += 1
    if result[i] == 'TLE':
        TLE += 1
    if result[i] == 'RE':
        RE += 1
print('AC x', AC)
print('WA x', WA)
print('TLE x', TLE)
print('RE x', RE)

N = int(input())
C0 =[]
C1 =[]
C2 =[]
C3 =[]
for i in range(N):
  S = input()
  if S == 'AC':
    C0.append(S)
  elif S == 'WA':
    C1.append(S)
  elif S == 'TLE':
    C2.append(S)
  elif S == 'RE':
    C3.append(S)

print('AC x ', len(C0))
print('WA x ', len(C1))
print('TLE x ', len(C2))
print('RE x ', len(C3))

import collections as cs
c=cs.Counter([input() for i in range(int(input()))])
print(f'AC x {c["AC"]}')
print(f'WA x {c["WA"]}')
print(f'TLE x {c["TLE"]}')
print(f'RE x {c["RE"]}')

n = int(input())

ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
    result = input()
    if result == "AC":
        ac = ac + 1
    elif result == "WA":
        wa = wa + 1
    elif result == "TLE":
        tle = tle + 1
    elif result == "RE":
        re = re + 1

print("AC x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))

a,w,t,r = 0,0,0,0
for _ in range(int(input())):
  s = input()
  if(s == "AC"):
    a += 1
  elif(s == "WA"):
      w += 1
  elif(s == "TLE"):
      t += 1
  else:
      r += 1
print("AC x",a)
print("WA x",w)
print("TLE x",t)
print("RE x",r)

import collections

n = int(input())
list = []
for i in range(n):
  x = input()
  list.append(x)
  
c = collections.Counter(list)

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

n = int(input())

s = [input() for i in range(n)]

numAC = 0
numWA = 0
numTLE = 0
numRE = 0

for i in range(len(s)):
    if s[i] == "AC":
        numAC += 1
    elif s[i] == "WA":
        numWA += 1
    elif s[i] == "TLE":
        numTLE += 1
    elif s[i] == "RE":
        numRE += 1
    else:
        continue
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(numAC,numWA,numTLE,numRE))

from collections import defaultdict
kero = ['AC', 'WA', 'TLE', 'RE']

tanuki = defaultdict(int)
n = int(input())
s = [input() for i in range(n)]
for res in s:
    tanuki[res] += 1

for k in kero:
    print(f'{k} x {tanuki[k]}')

n = int(input())
li = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0
for i in li:
    if i == 'AC':
        ac += 1
    elif i == 'WA':
        wa += 1
    elif i == 'TLE':
        tle += 1
    elif i == 'RE':
        re += 1
print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)

N = int(input())
S = [input() for i in range(N)]
   
print("AC x",S.count("AC"))
print("WA x",S.count("WA"))
print("TLE x",S.count("TLE"))
print("RE x",S.count("RE"))

def main():
    n = int(input())
    
    s = [input().rstrip('\r') for i in range(n)]
    li = ["AC", "WA", "TLE", "RE"]
    cnt = 0
    
    for i in range(len(li)):
        for j in s:
            if li[i] == j:
                cnt += 1
        print(li[i] + " x " + str(cnt))
        cnt = 0
    
    
def __starting_point():
    main()
__starting_point()

count = int(input())
lists = []

for i in range(count):
  new = input()
  lists.append(new)

ac_count = lists.count('AC')
wa_count = lists.count('WA')
tle_count = lists.count('TLE')
re_count = lists.count('RE')

print(("AC x " + str(ac_count)))
print(("WA x " + str(wa_count)))
print(("TLE x " + str(tle_count)))
print(("RE x " + str(re_count)))



import collections
N = int(input())
a = [input() for i in range(N)]
print("AC x "+str(a.count("AC")))
print("WA x "+str(a.count("WA")))
print("TLE x "+str(a.count("TLE")))
print("RE x "+str(a.count("RE")))

n = int(input())
s = [input() for i in range(n)]

ac, wa, tle, re = 0, 0, 0, 0

for s_e in s:
    if s_e == "AC":
        ac += 1
    elif s_e == "WA":
        wa += 1
    elif s_e == "TLE":
        tle += 1
    elif s_e == "RE":
        re += 1

print(f"AC x {ac}")
print(f"WA x {wa}")
print(f"TLE x {tle}")
print(f"RE x {re}")


count = {"AC":0,"WA":0, "TLE":0, "RE":0}
for i in range(int(input())):
    x = str(input())
    if x in count:
        count[x] += 1

print("AC x "  +  str(count["AC"]))
print("WA x "  +  str(count["WA"]))
print("TLE x " + str(count["TLE"]))
print("RE x "  +  str(count["RE"]))

res = []

n = int(input())

for i in range(n):
    r = input()
    res.append(r)

ac = res.count("AC")
wa = res.count("WA")
tle = res.count("TLE")
re = res.count("RE")

print("AC x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))

import collections
n = int(input())
res = [input() for i in range(n)]
a = collections.Counter(res)

print('{} x {}'.format('AC', a['AC']))
print('{} x {}'.format('WA', a['WA']))
print('{} x {}'.format('TLE', a['TLE']))
print('{} x {}'.format('RE', a['RE']))

N=int(input())
ac=0
wa=0
tle=0
re=0
for _ in range(N):
  s=input()
  if 'AC'==s:
     ac+=1
  elif 'WA'==s:
    wa+=1
  elif 'TLE'==s:
    tle+=1
  elif 'RE'==s:
    re+=1
print('AC','x',ac)
print('WA','x',wa)
print('TLE','x',tle)
print('RE','x',re)

ac = 0
wa = 0
tle = 0
re = 0
for i in range(int(input())):
    word = input()
    if word == "AC":
        ac += 1
    elif word == "WA":
        wa += 1
    elif word == "TLE":
        tle += 1
    elif word == "RE":
        re += 1
        
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))

N = int(input())
c0, c1, c2, c3 = 0, 0, 0, 0
for i in range(N):
    r = input()
    if r == 'AC':
        c0 += 1
    elif r == 'WA':
        c1 += 1
    elif r == 'TLE':
        c2 += 1
    else:
        c3 += 1
print('AC x ' + str(c0))
print('WA x ' + str(c1))
print('TLE x ' + str(c2))
print('RE x ' + str(c3))

n = int(input())
s = [input() for i in range(n)]
results = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for res in s:
    results[res] += 1
for r, num in results.items():
    print(f'{r} x {num}')

# coding: utf-8
# Your code here!

n = int(input())

ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
    s = input()
    if s =="AC":
        ac += 1
    elif s =="WA":
        wa += 1
    elif s =="TLE":
        tle += 1
    elif s =="RE":
        re += 1
    
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))

N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
  s = str(input())
  if s == 'AC':
    ac += 1
  elif s == 'WA':
    wa += 1
  elif s == 'TLE':
    tle += 1
  elif s =='RE':
    re += 1
print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)

N = int(input())
D = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(N):
    D[input()] += 1
for x, y in list(D.items()):
    print(("{0} x {1}".format(x, y)))



n=int(input())
acc=0
wac=0
tlec=0
rec=0
for i in range(n):
    s = input()
    if(s=="AC"):
        acc+=1
    elif(s=="WA"):
        wac+=1
    elif(s=="TLE"):
        tlec+=1
    elif(s=="RE"):
        rec+=1
print("AC x %d" %(acc))
print("WA x %d" %(wac))
print("TLE x %d" %(tlec))
print("RE x %d" %(rec))

N = int(input())
D = {"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(N):
  D[input()]+=1
for x,y in D.items():
  print("{0} x {1}".format(x,y) )

N=int(input())

item={"AC":0,"WA":0,"TLE":0,"RE":0}

for n in range(N):
    S=input()

    if S=="AC":
        item["AC"]+=1
    elif S=="WA":
        item["WA"]+=1
    elif S=="TLE":
        item["TLE"]+=1
    else:
        item["RE"]+=1

print("AC x",end=" ")
print(item["AC"])

print("WA x",end=" ")
print(item["WA"])

print("TLE x",end=" ")
print(item["TLE"])

print("RE x",end=" ")
print(item["RE"])


N = int(input())
string = ["AC", "WA", "TLE", "RE"]
count = [0] * 4
for i in range(N):
    s = input()
    if s == "AC":
        count[0] = count[0] + 1
    elif s == "WA":
        count[1] = count[1] + 1
    elif s == "TLE":
        count[2] = count[2] + 1
    else:
        count[3] = count[3] + 1
for j in range(len(count)):
    print(string[j] + " x " + str(count[j]))

n = int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  s=input()
  if(s == 'AC'):
      ac += 1
  elif(s == 'WA'):
      wa += 1
  elif(s == 'TLE'):
      tle += 1
  else:
      re += 1
print('AC x {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))

N = int(input())
S = ["AC", "WA", "TLE", "RE"]
a = []
ac = 0
wa = 0
tle = 0
re = 0
if N >= 1 and N <= 10**5:
   for x in range(N):
      a.append(input())
for x in a:
   if x == "AC":
      ac += 1
print ("AC x ", ac)
for x in a:
   if x == "WA":
      wa += 1
print ("WA x ", wa)
for x in a:
   if x == "TLE":
      tle += 1
print ("TLE x ", tle)
for x in a:
   if x == "RE":
      re += 1
print ("RE x ", re)

n=int(input())
a=[0]*4
b=["AC","WA","TLE","RE"]
for i in range(n):
    s=input()
    for j in range(4):
        if s == b[j]:
            a[j]+=1
for i in range(4):
    print(b[i]+" x "+str(a[i]))

N = int(input())
j = [input() for i in range(N)]
import collections
c = collections.Counter(j)
cs = c['AC']
ca = c['WA']
cb = c['TLE']
cc = c['RE']
print(f'AC x {cs}')
print(f'WA x {ca}')
print(f'TLE x {cb}')
print(f'RE x {cc}')


n = int(input())
s = [input() for _ in range(n)]
ac = s.count("AC")
wa = s.count("WA")
tle = s.count("TLE")
re = s.count("RE")

print(f"AC x {ac}")
print(f"WA x {wa}")
print(f"TLE x {tle}")
print(f"RE x {re}")

n = int(input())
ac, wa, tle, re = 0, 0, 0, 0;

for i in range(n):
    s = input()
    if s == 'AC':
        ac += 1
    elif s == 'WA':
        wa += 1
    elif s == 'TLE':
        tle += 1
    else:
        re += 1

print('AC', 'x', ac)
print('WA', 'x', wa)
print('TLE', 'x', tle)
print('RE', 'x', re)


n = int(input())
res = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(n):
    res[input()] +=1

for k in res:
    print(('{} x {}'.format(k, res[k])))


n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
  s = input()
  if s == "AC":
    ac += 1
  elif s == "WA":
    wa += 1
  elif s == "TLE":
    tle += 1
  else:
    re += 1
print("AC","x",ac)
print("WA","x",wa)
print("TLE","x",tle)
print("RE","x",re)

n = int(input())

ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
  s = input()
  if s == "AC":
    ac += 1
  elif s == "WA":
    wa += 1
  elif s == "TLE":
    tle += 1
  elif s == "RE":
    re += 1

print(("AC x {}".format(str(ac))))
print(("WA x {}".format(str(wa))))
print(("TLE x {}".format(str(tle))))
print(("RE x {}".format(str(re))))



N = int(input())

S = []

c0 = 0
c1 = 0
c2 = 0
c3 = 0
    
for i in range(N):
    S.append(input())
    
    if S[i] == "AC" :
        c0 += 1
    elif S[i] == "WA" :
        c1 += 1
    elif S[i] == "TLE" :
        c2 += 1
    elif S[i] == "RE" :
        c3 += 1
    
print("AC x " + str(c0))
print("WA x " + str(c1))
print("TLE x " + str(c2))
print("RE x " + str(c3))

N = int(input().split()[0])
a = [0,0,0,0]
for i in range(N):
    b=input().split()[0]
    if(b == 'AC'):
        a[0]+=1
    elif(b == 'WA'):
        a[1]+=1
    elif(b == 'TLE'):
        a[2]+=1
    elif(b == 'RE'):
        a[3]+=1
print(("AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}".format(a[0],a[1],a[2],a[3])))


N = int(input())
count= [0,0,0,0]
for _ in range(N):
    word = input()
    if word=='AC':
        count[0] += 1
    elif word=='WA':
        count[1] += 1
    elif word=='TLE':
        count[2] += 1
    elif word=='RE':
        count[3] += 1
print('AC x ',count[0])
print('WA x ',count[1])
print('TLE x ',count[2])
print('RE x ',count[3])

n = int(input())
result_dict = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
    s = input()
    result_dict[s] += 1
 
print('AC'+' x '+str(result_dict['AC']))
print('WA'+' x '+str(result_dict['WA']))
print('TLE'+' x '+str(result_dict['TLE']))
print('RE'+' x '+str(result_dict['RE']))

import sys
from collections import deque, defaultdict, Counter
from itertools import accumulate, product, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right
from heapq import heappop, heappush
from math import ceil, floor, sqrt, gcd, inf
from copy import deepcopy
import numpy as np
import scipy as sp

INF = inf
MOD = 1000000007

n = int(input())
S = [input() for j in range(n)] # nは行数

tmp = 0
res = 0

tmp = Counter(S)
res = f"""AC x {tmp["AC"]}
WA x {tmp["WA"]}
TLE x {tmp["TLE"]}
RE x {tmp["RE"]}"""

print(res)


N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  value = str(input())
  if value == 'AC':
    AC += 1
  elif value == 'WA':
    WA += 1
  elif value == 'TLE':
    TLE += 1
  else:
    RE += 1
print(('AC x ' + str(AC)))
print(('WA x ' + str(WA)))
print(('TLE x ' + str(TLE)))
print(('RE x ' + str(RE)))


N = int(input())
dic = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0} # キーと初期値を設定

for i in range(N):
    S = input()
    if S == "AC":
        dic["AC"] += 1
    elif S == "WA":
        dic["WA"] += 1
    elif S == "TLE":
        dic["TLE"] += 1
    else:
        dic["RE"] += 1

for key in list(dic.keys()):
    print(("{0} x {1}".format(key, dic[key])))



N = int(input())
C = 0
D = 0
E = 0
F = 0
S = ''

for i in range(N):
    S = input()
    if S == 'AC':
        C += 1
    elif S == 'WA':
        D += 1
    elif S == 'TLE':
        E += 1
    elif S == 'RE':
        F += 1
print('AC x '+ str(C), 'WA x ' + str(D),  'TLE x ' + str(E),  'RE x ' + str(F), sep='\n')


N = int(input())
S = [input() for S in range(N)]
C = [0, 0, 0, 0]

for i in range(N):
  if S[i] == 'AC':
    C[0] += 1
  elif S[i] == 'WA':
    C[1] += 1
  elif S[i] == 'TLE':
    C[2] += 1
  elif S[i] == 'RE':
    C[3] += 1

print('AC x ', C[0])
print('WA x ', C[1])
print('TLE x ', C[2])
print('RE x ', C[3])

n=int(input())
a,w,t,r=0,0,0,0
for i in range(n):
  g=input()
  if g=='AC':
    a+=1
  if g=='WA':
    w+=1
  if g=='TLE':
    t+=1
  if g=='RE':
    r+=1
print('AC x ' + str(a))
print('WA x ' + str(w))
print('TLE x ' + str(t))
print('RE x ' + str(r))

n=int(input())
d={
  'AC':0,
  'WA':0,
  'TLE':0,
  'RE':0
}

for i in range(n):
  d[input()]+=1

for k,v in d.items():
  print(k,'x', v)

def ans173(N:int, S:list):
    return (f"""AC x {(S.count("AC"))}
WA x {(S.count("WA"))}
TLE x {(S.count("TLE"))}
RE x {(S.count("RE"))}""")

N=int(input())
S=[input() for i in range(N)]
print(ans173(N,S))

N = int(input())

S = [input() for i in range(N)]

c0 = (S.count("AC"))
c1 = (S.count("WA"))
c2 = (S.count("TLE"))
c3 = (S.count("RE"))

print("AC x " + str(c0))
print("WA x " + str(c1))
print("TLE x " + str(c2))
print("RE x " + str(c3))

N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range (N):
    S = input()
    if S == "AC":
        AC += 1
    elif S ==  "WA": 
        WA += 1
    elif S == "TLE":
        TLE += 1
    elif S ==  "RE":
        RE += 1
print("AC x ",AC)
print("WA x ",WA)
print("TLE x ",TLE)
print("RE x ",RE)

from collections import *
c=Counter(map(lambda x:x[:-1],open(0)))
for s in["AC","WA","TLE","RE"]:print(s,"x",c[s])

n=int(input())
a=[input() for i in range(n)]

for i in ['AC','WA','TLE','RE']:
  print(f'{i} x {a.count(i)}')

N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(N):
    S = input()
    if S == "AC":
        AC += 1
    elif S == "WA":
        WA += 1
    elif S == "TLE":
        TLE += 1
    else:
        RE += 1
    
    
print("AC x",AC)
print("WA x",WA)
print("TLE x",TLE)
print("RE x",RE)

n = int(input())
s = [input().split() for i in range(n)]
a = 0
b = 0
c = 0
d = 0
for i in range(n):
    if s[i][0] == 'AC':
        a += 1
    elif  s[i][0] == 'WA':
        b += 1
    elif s[i][0] == 'TLE':
        c += 1
    else:
        d += 1
print('AC x '+str(a))
print('WA x '+str(b))
print('TLE x '+ str(c))
print('RE x '+str(d))

from collections import Counter
from typing import List


def answer(n: int, s: List[str]) -> List[str]:
    result = []
    judges = ['AC', 'WA', 'TLE', 'RE']
    aggregate = {i: 0 for i in judges}
    counter = Counter(s)

    for i in counter:
        aggregate[i] += counter[i]
    for j in aggregate:
        result.append(f'{j} x {aggregate[j]}')

    return result


def main():
    n = int(input())
    s = [input() for _ in range(n)]
    for i in answer(n, s):
        print(i)


def __starting_point():
    main()
__starting_point()

N = int(input())
S_list = [input() for i in range(N)]

ac = S_list.count("AC")
wa = S_list.count("WA")
tle = S_list.count("TLE")
re = S_list.count("RE")

print(f'AC x {ac}')
print(f'WA x {wa}')
print(f'TLE x {tle}')
print(f'RE x {re}')

from typing import List


def answer(n: int, s: List[str]) -> List[str]:
    result = []
    judges = ['AC', 'WA', 'TLE', 'RE']
    for i in judges:
	    result.append(f'{i} x {s.count(i)}')

    return result


def main():
    n,*s = open(0).read().split()
    for i in answer(n, s):
        print(i)


def __starting_point():
    main()
__starting_point()

n = int(input())
s = []
for i in range(n):
    s.append(input())
ac = s.count("AC")
wa = s.count("WA")
tle = s.count("TLE")
re = s.count("RE")

print("AC x", ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)

N = int(input())

data = [input() for _ in range(N)]

def f(s):
  c = len([x for x in data if x in s])
  print(f"{s} x {c}")
  
f("AC")
f("WA")
f("TLE")
f("RE")


n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(n):
    s = input()
    if(s == "AC"):
        AC += 1
    elif(s == "WA"):
        WA += 1
    elif(s == "TLE"):
        TLE  += 1
    else:
        RE += 1
print(('AC x {}'.format(AC)))
print(('WA x {}'.format(WA)))
print(('TLE x {}'.format(TLE)))
print(('RE x {}'.format(RE)))


N = int(input())
C = 0
D = 0
E = 0
F = 0
S = ''

for i in range(N):
    S = input()
    if S == 'AC':
        C += 1
    elif S == 'WA':
        D += 1
    elif S == 'TLE':
        E += 1
    elif S == 'RE':
        F += 1
print('AC x '+ str(C), 'WA x ' + str(D),  'TLE x ' + str(E),  'RE x ' + str(F), sep='\n')


N=int(input())
S=[]
AC=0
TLE=0
WA=0
RE=0

for i in range(0,N):
	S.append(input())
	if S[i]=='AC':
		AC+=1
	elif S[i]=='TLE':
		TLE+=1
	elif S[i]=='WA':
		WA+=1
	elif S[i]=='RE':
		RE+=1

print('AC x %d'%AC)
print('WA x %d'%WA)
print('TLE x %d'%TLE)
print('RE x %d'%RE)

N = int(input())
S = []
for _ in range(N):
    S.append(input())

AC = 0
WA = 0
TLE = 0
RE = 0

for s in S:
    if(s == "AC"):
        AC += 1
    elif(s == "WA"):
        WA += 1
    elif(s == "TLE"):
        TLE += 1
    elif(s == "RE"):
        RE += 1

print(f"AC x {AC}")
print(f"WA x {WA}")
print(f"TLE x {TLE}")
print(f"RE x {RE}")


n=int(input())
s=[input() for i in range(n)]
print("AC x "+str(s.count("AC")))
print("WA x "+str(s.count("WA")))
print("TLE x "+str(s.count("TLE")))
print("RE x "+str(s.count("RE")))

N = int(input())
S = [input() for i in range(N)]
A = 0
W = 0
T = 0 
R = 0

for i in range(len(S)):
  if S[i] == 'AC':
    A += 1
  elif S[i] == 'WA':
    W += 1
  elif S[i] == 'TLE':
    T += 1
  else:
    R += 1

print('AC x ' + str(A))
print('WA x ' + str(W))
print('TLE x ' + str(T))
print('RE x ' + str(R))

N = int(input())
judge = {"AC":0, "WA":0, "TLE":0, "RE":0}
 
for _ in range(N):
    j_input = input()
    for j in judge.keys():
        if j_input == j:
            judge[j] += 1
 
for j in judge.keys():
    print(j , end = " x ")
    print(judge[j])

def main():
    N = int(input())
    result = {"AC": 0, "WA": 0, "TLE": 0, "RE":0}

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

    print(( "AC x " + str(result["AC"]) ))
    print(("WA x " + str(result["WA"])))
    print(("TLE x " + str(result["TLE"])))
    print(("RE x " + str(result["RE"])))

main()


# listじゃなくてdict使いたい
n = int(input())
j = [0] * 4
moji = ["AC", "WA", "TLE", "RE"]
for i in range(n):
    s=input()
    if s == "AC":
        j[0] += 1
    elif s=="WA":
        j[1] += 1
    elif s=="TLE":
        j[2] += 1
    elif s == "RE":
        j[3] += 1
for k in range(4):
    print(f"{moji[k]} x {j[k]}")


N = int(input())
ac, wa, tle, re = 0, 0, 0, 0
for i in range(N):
    s = input()
    if s == "AC": ac += 1
    elif s == "WA": wa += 1
    elif s == "TLE": tle += 1
    else: re += 1
print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

def resolve():
    N = int(input())
    AC=0;WA=0;TLE=0;RE=0
    for i in range(N):
        S = input()
        if S=="AC":
            AC+=1
        elif S=="WA":
            WA+=1
        elif S=="TLE":
            TLE+=1
        elif S=="RE":
            RE+=1

    print("AC x "+str(AC))        
    print("WA x "+str(WA))        
    print("TLE x "+str(TLE))        
    print("RE x "+str(RE))    

resolve()

N = int(input().split()[0])
a = [0,0,0,0]
for i in range(N):
    b=input().split()[0]
    if(b == 'AC'):
        a[0]+=1
    elif(b == 'WA'):
        a[1]+=1
    elif(b == 'TLE'):
        a[2]+=1
    elif(b == 'RE'):
        a[3]+=1
print(("AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}".format(a[0],a[1],a[2],a[3])))


N = int(input())
ans_ac = 0
ans_wa = 0
ans_tle =0
ans_re =0

for i in range(N):
    S = input()
    if S == 'AC':
        ans_ac += 1
    elif S == 'WA':
        ans_wa += 1
    elif S == 'TLE':
        ans_tle += 1
    else:
        ans_re += 1

print('AC','x',ans_ac)
print('WA','x',ans_wa)
print('TLE','x',ans_tle)
print('RE','x',ans_re)