peterverebics/CodeNet_Python_118 huggingface dataset:
n = int(input())
s = []
for i in range(n):
    s += [input()]
c0 = s.count("AC")
c1 = s.count("WA")
c2 = s.count("TLE")
c3 = s.count("RE")
print("AC × " + str(c0))
print("WA × " + str(c1))
print("TLE × " + str(c2))
print("RE × " + str(c3))
a=int(input())

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

print("AC ×",s.count("AC"))
print("WA ×",s.count("WA"))
print("TLE ×",s.count("TLE"))
print("RE ×",s.count("RE"))
n = int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
    tmp = input()
    if tmp == 'AC':
        ac+=1
    elif  tmp == 'WA':
        wa+=1
    elif  tmp == 'TLE':
        tle+=1
    elif  tmp == 'RE':
        wa+=1
    else:
        continue
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):
  tmp = input()
  if(tmp == "AC"):
    AC += 1
  if(tmp == "WA"):
    WA += 1
  if(tmp == "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())
cnt = []
for i in range(n):
    s = input()
    cnt.append(s)
print("AC ×", cnt.count('AC'))
print("WA ×", cnt.count("WA"))
print("TLE ×", cnt.count("TLE"))
print("RE ×", cnt.count("RE"))
S=input()
S=int(S)
a = [input() for i in range(S)]
AC=0
WA=0
TLE=0
RE=0
print(a)
for a in a:
    if a=="AC":
        AC+=1
    if a=="WA":
        WA+=1
    if a=="TLE":
        TLE+=1
    if a=="RE":
        RE+=1
print("AC x "+str(AC) )
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))
def main(case):
  AC = 0
  WA = 0
  TLE = 0
  RE = 0
  others = 0
  for i in range(len(case)):
    
    if case[i] == "AC":
      AC += 1
      
    elif case[i] == "WA":
      WA += 1
      
    elif case[i] == "TLE":
      TLE += 1
      
    elif case[i] == "RE":
      RE += 1
      
    else :
      others += 1
      
  print("AC"+" x "+str(AC))
  print("WA"+" x "+str(WA))
  print("TLE"+" x "+str(TLE))
  print("RE"+" x "+str(RE))
N=int(input())

S=[]

for _ in range(N):
    S.append(input())

print('AC x ',S.count('AC'))
print('WA x ',S.count('WA'))
print('TLE x ',S.count('TLE'))
print('RA x ',S.count('RA'))
n = int(input())
k = {}
k['AC\r'] =0
k["TLE\r"]=0
k["WA\r"]=0
k["RE\r"]=0
for i in range(n):
    a = str(input())
    #print(a)
    if a in k:
        k[a]+=1
print("AC x {}".format(k['AC\r']))
print("WA x {}".format(k['WA\r']))
print("TLE x {}".format(k['TLE\r']))
print("RE x {}".format(k['RE\r']))
N = int(input())
AC,WA,RE,TLE = 0,0,0,0
for i in range(N):
    result = input()
    if result == "AC":
        AC += 1
    elif result == "WA":
        WA += 1
    elif result == "RE":
        RE += 1
    else:
        TLE += 1

print("AC x " + str(AC))
print("WA x " + str(WA))
print("RE x " + str(RE))
print("TLE x " + str(TLE))
def main():
    n = int(input())
    mylist = []
    for i in range(1, n+1):
        s = input()
        mylist.append(s)
    ac=mylist.count('AC')
    wa=mylist.count('WA')
    tle=mylist.count('TLE')
    re=mylist.count('RE')
    print('AC × ' + str(ac))
    print('WA × ' + str(wa))
    print('TLE × ' + str(tle))
    print('RE × ' + str(re))
if __name__ == "__main__":
    main()
import math
import sys

n = int(input())
e = pow(10,5)

if (n<1)or(e<n):
    sys.exit(0)

i = 1
ac = 0
wa = 0
tle = 0
re = 0
while i<=n:
    s = input()
    if s=="AC":
        ac += 1
    elif s=="WA":
        wa += 1
    elif s=="TLE":
        tle += 1
    elif s=="RE":
        re += 1
    else:
        sys.exit(0)
    i+=1

print("AC ×", ac)
print("WA ×", wa)
print("TLE ×", tle)
print("RE ×", 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 ×",AC)
print("WA ×",WA)
print("TLE ×",TLE)
print("RE ×",RE)
N = int(input())
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0


for i in range(N):
    x = input()
    if x == "AC":
        count_AC += 1
    elif x == "WA":
        count_WA += 1
    elif x == "TLE":
        count_TLE += 1
    elif x ==  "count_RE":
        count_RE += 0

print("AC", "x", count_AC)
print("WA", "x", count_WA)
print("TLE", "x", count_TLE)
print("RE", "x", count_RE)
N = int(input())
C0, C1, C2, C3 = 0, 0, 0, 0

for i in range(N-1):
    S = str(input())
    if S == "AC":
        C0 = C0 + 1
    elif S == "WA":
        C1 = C1 + 1
    elif S == "TLE":
        C2 = C2 + 1
    else:
        C3 = 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())

l = [0]*4
for i in range(N):
  S = input()
  if S == "AC":
    l[0] += 1
  elif S == "WA":
    l[1] += 1
  elif S == "TLE":
    l[2] += 1
  elif S == "re":
    l[3] += 1
    
print("AC x", l[0])
print("WA x", l[1])
print("TLE x", l[2])
print("RE x", l[3])
from collections import defaultdict as d
from itertools import combinations as c
from string import ascii_lowercase as a

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

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

print("AC ×",ac)
print("WA ×",wa)
print("TLE ×",tle)
print("RE ×",re)
import collections
N = int(input())
S = [input() for i in range(N)]
c = collections.Counter(S)
print("AC　" + "×　" + str(c["AC"]))
print("WA　" + "×　" + str(c["WA"]))
print("TLE　" + "×　" + str(c["TLE"]))
print("RE　" + "×　" + str(c["RE"]))
a = []
N = int(input())
for i in range(N):
   s = input()
   a.append(s)

print("AC x{}".format(a.count("AC")))
print("TLE x{}".format(a.count("TLE")))
print("WA x{}".format(a.count("WA")))
print("RE x{}".format(a.count("RE")))
N = int(input())

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



print('AC x %d'%ac)
print('WA x %d'%wa)
print('TLE x %d'%tle)
print('RE x %d'%re)
a = int(input())
i = 0
o = 0
p = 0
s = 0
l = 0
while i < a :
    b = input()
    if b == "AC" :
        o = o + 1
    if b == "WA" :
        p = p + 1
    if b == "TLE" :
        s = s + 1
    if b == "RE" :
        l = l + 1
    i = i + 1
print("AC" , "*" , o)
print("WA" , "*" , p)
print("TLE" , "*" , s)
print("RE" , "*" , l)
N = int(input())

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

for i in range(1,N+1):
  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 × " + str(ac))
print("WA × " + str(wa))
print("TLE × " + str(tle))
print("RE × " + str(re))
from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math
from bisect import bisect,bisect_right,bisect_left

def get_int():
    return int(stdin.readline().strip())


def get_tuple():
    return map(int, stdin.readline().split())


def get_list():
    return list(map(int, stdin.readline().split()))

n = get_int()
dic = defaultdict(int)
for _ in range(n):
    st = input()
    dic[st] += 1
for val in ['AC','WA','TLE','RE']:
    print(val+" * "+str(dic[val]))
import sys
na=0
nw=0
nt=0
nr=0
i = int(input())
for n in range(i):
    a=input()
    if a=="AC":
        na= na +1
    elif a=="WA":
        nw= nw+1
    elif a=="TLE":
        nt=nt+1
    else:
        nr=nr+1
print('AC ×',na)
print('WA ×',nw)
print('TLE ×',nt)
print('RE ×',nr)
N = int(input())
cnt1 = 0
cnt2 = 0
cnt3 = 0
cnt4 = 0
for i in range(N):
  S = input()
  if S == 'AC':
    cnt1 += 1
  elif S == 'WA':
    cnt2 += 1
  elif S == 'TLE':
    cnt3 += 1
  else:
    cnt4 += 1
print( 'AC ×' + str(cnt1) )
print( 'WA ×' + str(cnt2) )
print( 'TLE ×' + str(cnt3) )
print( 'RE ×' + str(cnt4) )
n = int(input())
ct_ac = 0
ct_wa = 0
ct_tle = 0
ct_re = 0
for i in range(n):
    s = input()
    if s == 'AC':
        ct_ac += 1
    if s == 'WA':
        ct_wa += 1
    if s == 'TLE':
        ct_tle += 1
    if s == 'RE':
        ct_re += 1

print('AC × ' + str(ct_ac))
print('WA × ' + str(ct_wa))
print('TLE × ' + str(ct_tle))
print('RE × ' + str(ct_re))
n=int(input())
ct=0
count=0
a=0
b=0

for i in range(1,n+1):
    s=input()
    if(s=="AC"):
        ct=ct+1
    elif(s=="WA"):
        count=count+1
    elif(s=="TLE"):
        a=a+1
    elif(s=="Re"):
        b=b+1
print("AC*",ct)
print("WA*",count)
print("TLE*",a)
print("RE*",b)
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  deta = input()
  if deta == 'AC':
    AC += 1
  elif deta == 'WA':
    WA += 1
  elif deta == 'WA':
    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))
a=int(input())
AC=[]
WA=[]
TLE=[]
RE=[]
for i in range(a):
  s=(input())
  if s=='AC':
     AC.append(s)
  if s=='TLE':
     TLE.append(s)   
  if s=='WA':
     WA.append(s)
  if s=='RE':
     RE.append(s)
print('AC', '×',len(AC))
print('WA','×',len(WA))
print('TLE','×',len(TLE))
print('RE','×',len(RE))
N = int(input())
C0 = C1 = C2 = C3 = 0
for _ in range(N):
    S = input()
    if S == "AC":
        C0 += 1
    elif S == "WA":
        C1 += 1
    elif S == "TLE":
        C2 += 1
    elif S == "RE":
        C3 += 1

print("AC × %d"%C0)
print("WA × %d"%C1)
print("TLE × %d"%C2)
print("RE × %d"%C3)
n=int(input())


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


print("AC × ",ac)
print("WA × ",wa)
print("TLE × ",tle)
print("RE × ",re)
ac=0
wa=0
tle=0
re=0
n=int(input())
for i in range (0,n):
    s=input()
    if s=='AC' :
        ac=ac+1
    elif s=='WA' :
        wa=wa+1
    elif s=='TLE' :
        tle=tle+1
    else :
        re=re+1
print("AC ×"+str(ac))
print("WA ×"+str(wa))
print("TLE ×"+str(tle))
print("RE ×"+str(re))
N = int(input())
S = []
for i in range(N):
  S.append(input())
 
A = S.count("AC")
B = S.count("WA")
C = S.count("TLE")
D = S.count("RE")
 
print("AC × "+str(A))
print("WA × "+str(B))
print("TLE × "+str(C))
print("RE × "+str(D))
N = int(input())
status={'AC':0, 'WA':0, 'TLE':0, 'RE':0}
results = [input() for n in range(N)]
for result in results:
     if result in status.keys():
         status[result] += 1
for k, v in status.items():
    print('{} × {}'.format(k, v))
n = int(input())

s = []
for _ in range(n):
  s1 = input()
  s.append(s1)

print('AC × ' + str(s.count('AC')))
print('WA × ' + str(s.count('WA')))
print('TLE × ' + str(s.count('TLE')))
print('RE × ' + str(s.count('RE')))
n = int(input())

a = 0
b = 0
c = 0
d = 0



for i in range(n):
    s = input() 
    if s == 'AC':
        a += 1
    elif s == 'WA':
        b += 1
    elif s == 'TLE':
        c += 1
    elif s == 'RE':
        d += 1

print('AC × ', a)
print('WA × ', b)
print('TLE × ', c)
print('RE × ', d)
n = int(input())

L = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(n):
    s = input()
    L[s] += 1
for i in L:
    print('{} × {}'.format(i, L[i]))
a=int(input())

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

print("AC x ",s.count("AC"))
print("WA × ",s.count("WA"))
print("TLE × ",s.count("TLE"))
print("RE × ",s.count("RE"))
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    tmp = input()
    if tmp == "AC":
        ac += 1
    elif tmp == "WA":
        wa += 1
    elif tmp == "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))
import collections
N = int(input())
S = [input() for _ in range(N)]
c = collections.Counter(S)
 
print('AC', '×', c['AC'])
print('WA', '×', c['WA'])
print('TLE', '×', c['TLE'])
print('RE', '×', c['RE'])
N = int(input())
S = []
word_list = ["AC","WA","TLE","RE"]
for i in range(N):                     
    array = input()
    S.append(array)

for i in range(4):
  print(word_list[i] +"　×　"+str(S.count(word_list[i])))
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())
S = [input() for i in range(N)]
print('AC × %d'%S.count('AC'))
print('WA × %d'%S.count('WA'))
print('TLE × %d'%S.count('TLE'))
print('RE × %d'%S.count('RE'))
n = int(input())
a = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0
for s in a:
  if a=='AC':
    ac+=1
  if a=='WA':
    wa+=1
  if a=='TLE':
    tle+=1
  if a=='RE':
    re+=1
print(f'AC × {ac}')
print(f'WA × {wa}')
print(f'TLE × {tle}')
print(f'RE × {re}')
N = int(input())

dic = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for _ in range(N):
    w = input()
    dic[w] += 1

print('AC ×', dic['AC'])
print('WA ×', dic['WA'])
print('TLE ×', dic['TLE'])
print('RE ×', dic['RE'])
N = int(input())

i = 1
AC = 0
WA = 0
TLE = 0
RE = 0
while i < N+1:
    a = str(input())
    if a == "AC":
        AC = AC + 1
    elif a == "WA":
        WA = WA + 1
    elif a == "TLE":
        TLE = TLE + 1
    elif a == "RE":
        RE = RE + 1
    i = i + 1

print("AC x"+str(AC))
print("WA x" +str(WA))
print("TLE x" + str(TLE))
print("RE x"+str(RE))
nums = int(input("num:"))

S = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

for i in range(0, nums):
    input_str = input("input_str:")
    if input_str in S:
        S[input_str] += 1

print('AC x %d' % S['AC'])
print('WA x %d' % S['WA'])
print('TLE x %d' % S['TLE'])
print('RE x %d' % S['RE'])
n = int(input())
s = [str(input()) for i in range(n)]

a = s.count(('AC'))
b = s.count(('WA'))
c = s.count(('TLE'))
d = s.count(('RE'))

print("AC x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("Re x {}".format(d))
a=int(input())
cAC=0
cWA=0
cTLE=0
cRE=0
for i in range(a):
    b=input()
    if b=="AC":
        cAC+=1
    elif b=="WA":
        cWA=1
    elif b=="TLE":
        cTLE+=1
    elif b=="RE":
        cRE+=1
print("AC ×",cAC)
print("WA ×",cWA)
print("TLE ×",cTLE)
print("RE ×",cRE)
N = int(input())
a = 0
w = 0
t = 0
r = 0
for i in range(N):
    S = input()
    if S == "AC":
        a += 1
    elif S == "WA":
        w += 1
    elif S == "TLE":
        t += 1
    elif S == "RE":
        r += 1
print("AC","x",a)
print("WA","x",w)
print("TLE","x",t)
print("RA","x",r)
N = int(input())
AC = "AC"
WA = "WA"
TLE = "TLE"
RE = "RE"
list = []
for i in range(N):
    string = input()
    list.append(string)
C0 = list.count(AC)
C1 = list.count(WA)
C2 = list.count(TLE)
C3 = list.count(RE)
print(AC+f" x {C0}")
print(AC+f" x {C1}")
print(AC+f" x {C2}")
print(AC+f" x {C3}")
ls=["AC","TLE","RE","WA"]
n=int(input())
a=b=c=d=0
for i in range(n):
  s=input()
  if s==ls[0]:
    a+=1
  elif s==ls[1]:
    b+=1
  elif s==ls[2]:
    c+=1
  else:
    d+=1
print(ls[0]+" *",a)
print(ls[1]+" *",b)
print(ls[2]+" *",c)
print(ls[3]+" *",d)
n = int(input())

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

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

for i in range(n):
    out[s[i]] += 1
for i in ["AC","WA","TLE","RE"]:
    print(f"{i} × {out[i]}")
n = int(input())
s = [input() for _ in range(n)]

c0 = s.count('AC')
c1 = s.count('WA')
c2 = s.count('TLE')
c3 = s.count('RE')

print('AC x', c0)
print('WA ×', c1)
print('TLE ×', c2)
print('RE ×', c3)
n = int(input())
s = [str(input()) for _ in range(n)]

dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

for i in s:
    if i == 'AC':
        dic['AC'] += 1
    elif i == 'WA':
        dic['WA'] += 1
    elif i == 'TLE':
        dic['TLE'] += 1
    else:
        dic['RE'] += 1

for i in dic:
    # print(i)
    print("{0} × {1}".format(i, dic[i]))
N = int(input())
ac, re, wa, tle = 0,0,0,0
for i in range(N):
  line = input()
  if line == "AC":
    ac += 1
  elif line == "TLE":
    tle += 1
  elif line == "WA":
    wa += 1
  elif line == "RE":
    re += 1
print("AC × " + str(ac))
print("WA × " + str(wa))
print("TLE × " + str(tle))
print("RE × " + str(re))
N = int(input())
for i in range(N):
  s = input()    
print('AC','x',s.count('AC'))
print('TLE','x',s.count('TLE'))
print('RE','X',s.count('RE'))
print('WJ','x',s.count('WJ'))
n=int(input())
ct=0
count=0
a=0
b=0

for i in range(1,n+1):
    s=input()
    if(s=="AC"):
        ct=ct+1
    elif(s=="WA"):
        count=count+1
    elif(s=="TLE"):
        a=a+1
    elif(s=="Re"):
        b=b+1
print("AC x",ct)
print("WA x",count)
print("TLE x",a)
print("RE x",b)
n = int(input())
s = [input() for i in range(n)]

status = ["AC","WA","TLE","RE"]
ans  = [0]*4

for i in range(len(status)):
    ans[i] = len([j for j in s if status[i] in s])

print("AC x {}".format(ans[0]))
print("WA x {}".format(ans[1]))
print("TLE x {}".format(ans[2]))
print("RE x {}".format(ans[3]))
count_ac=0
count_wa=0
count_tle=0
count_re=0
n=int(input())
for i in range(n):
    s=input()
    if s == "AC":
        count_ac += 1
    elif s == "WA":
        count_wa += 1
    elif s == "TLE":
        count_tle += 1
    else:
        count_re += 1
print("AC x "+str(count_wa))
print("WA x "+str(count_ac))
print("TLE x "+str(count_tle))
print("RE x "+str(count_re))
import sys
N = int(input())

dict = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for _ in range(N):
    S = input()
    if S in dict:
        i = dict.get(S)
        i += 1
        dict[S] = i

for key in dict.keys():
    print(key, '×', dict.get(key))
import collections

n = int(input())
case = list(input() for _ in range(n))

cn = collections.Counter(case)
print(cn)

print("AC x " + str(cn["AC"]))
print("WA x " + str(cn["WA"]))
print("TLE x " + str(cn["TLE"]))
print("RE x " + str(cn["RE"]))
a = int(input())
jud = []
for i in range(a):
	jud.append(input().strip())
print(a)
print('AC x '+str(jud.count('AC')))
print('WA x '+str(jud.count('WA')))
print('TLE x '+str(jud.count('TLE')))
print('RE x '+str(jud.count('RE')))
t = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(t):
    s = str(input())
    if s == 'AC':
        c0 += 1
    elif s == 'WA':
        c1 += 1
    elif s == 'TLE':
        c2 += 1
    elif s == '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())

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

for i in range(1,N+1):
  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 × " + str(ac))
print("WA × " + str(wa))
print("TLE × " + str(tle))
print("AC × " + str(re))
N=int(input())
ac=0
wa=0
tre=0
re=0
for i in range(N):
  str=input()
  if str=="AC":
    ac=ac+1
  elif str=="WA":
    wa=wa+1
  elif str=="TRE":
    tre=tre+1
  else:
    re=re+1
print("AC x ", ac)
print("WA x ", wa)
print("TRE x ", tre)
print("RE x ", re)
N = int(input())

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

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

print(N)
print("AC × "+str(AC))
print("WA × "+str(WA))
print("TLE × "+str(TLE))
print("RE × "+str(RE))
n = int(input())
a = [0]*4

for i in range(n):
    s = input()
    if s == "AC":
        a[0] += 1
    elif s == "WA":
        a[1] += 1
    elif s == "TLE":
        a[2] += 1
    else:
        a[3] += 1
        
print("AC"*a[0])
print("WA"*a[1])
print("TLE"*a[2])
print("RE"*a[3])
n=int(input())
s = [0]*n
for i in range(n):
    s[i] = input()

from collections import Counter
c=Counter(s)

print( "AC × "+str(c["AC"]) )
print( "WA × "+str(c["WA"]) )
print( "TLE × "+str(c["TLE"]) )
print( "RE × "+str(c["RE"]) )
n = int(input())
s = [input() for _ in range(n)]

cnt_ac = s.count('AC')
cnt_wa = s.count('WA')
cnt_tle = s.count('TLE')
cnt_re = s.count('RE')

print(f'AC × {cnt_ac}')
print(f'WA × {cnt_wa}')
print(f'TLE × {cnt_tle}')
print(f'RE × {cnt_re}')
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    temp = input()
    if temp == "AC":
        AC = AC + 1
    if temp == "WA":
        WA = WA + 1
    if temp == "TLE":
        TLE = TLE + 1
    if temp == RE:
        RE = RE + 1
print("AC x " + str(AC))
print("WA x " + str(WA))
print("TLE x " + str(TLE))
print("RE x " + str(RE))
from collections import Counter
from math import sqrt
import math

n = int(input())
a = []
b = ["AC" , "TLE" , "WA" , "RE"]
for i in range(n):
    a.append(input())
c = Counter(a)
for i in b:
    print(i , " x ",  c[i])
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
s = [""] * n
for i in range(n):
    s[i] = input()
    if s[i] == "AC":
        ac += 1
    elif s[i] == "WA":
        wa += 1
    elif s[i] == "TLE":
        tle += 1
    else:
        re += 1
print(f"AC × {ac}\nWA × {wa}\nTLE × {tle}\nRE × {re}")
N = int(input())

c0 = 0
c1 = 0
c2 = 0
c3 = 0

for _ in range(N):
  c = input()
  if c == 'AC':
    c0 += 1
  elif c == 'WA':
    c1 += 1
  elif c == 'LTE':
    c2 += 1
  elif c == 'RE':
    c3 += 1

    
print('AC x ' + str(c0))
print('WA x ' + str(c1))
print('LTE x ' + str(c2))
print('RE x ' + str(c3))
n=int(input())
lst=[]
all=["AC","WA","TLE","RE"]
for _ in range(n):
    a=input()
    lst.append(a)
for i in all:
    print(i,"×",lst.count(i))
a=int(input())
b=[input() for i in range(a)]
print("AC × {}".format(b.count("AC")))
print("WA × {}".format(b.count("WA")))
print("TLE × {}".format(b.count("TLE")))
print("RE × {}".format(b.count("RE")))
n = int(input())
result = {}
l = ['AC','WA','TLE','RE']
for i in l:
    result[i] = 0
for _ in range(n):
    result[input()] += 1
for i in l:
    print(f'AC x {result[i]}')
n = int(input())
s = [input() for i in range(n)]

nac = 0
nwa = 0
ntle = 0
nre = 0

print(s)
for i in s:
    if i == 'AC':
        nac += 1
    if i == 'WA':
        nwa += 1
    if i == 'TLE':
        ntle += 1
    if i == 'RE':
        nre += 1

print("AC x ", nac)
print("WA x ", nwa)
print("TLE x ", ntle)
print("RE x ", nre)
n=int(input())
a=0
w=0
t=0
r=0
for i in range(n):
    s=str(input())
    if(s=='AC'):
        a+=1
    elif(s=="WA"):
        w+=1
    elif(s=="TLE"):
        t+=1
    else:
        r+=1
print('AC', '×',a)
print('WA ', '×',w)
print('TLE ', '×',t)
print('RE ', '×',r)
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
  else:
    break

print('AC x ',ac)
print('WA × ',wa)
print('TLE × ',tle)
print('RE × ',re)
import math
def main():
    judge_l = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    l = int(input().rstrip())
    for i in range(l):
      judge = input().rstrip()
      judge_l[judge] += 1
    
    print('AC × {}'.format(judge_l['AC']), end='\n')
    print('WA × {}'.format(judge_l['WA']), end='\n')
    print('TLE × {}'.format(judge_l['TLE']), end='\n')
    print('RE × {}'.format(judge_l['RE']), end='')
    
if __name__ == "__main__":
    main()
n=int(input())

a=0
w=0
t=0
r=0

for i in range(n):
  s=str(input())
  if s=="AC":
    a+=1
  elif s=="WA":
    w+=1
  elif s=="TLE":
    t+=1
  else:
    r+=1


print("AC ×",a)
print("WA ×",w)
print("TLE ×",t)
print("RE ×",r)
ac = 0
wa = 0
tle = 0
re = 0

n = int(input())
for i in range(n):
  x = input()
  if x=='AC':
    ac = ac+1
  elif x=='WA':
    wa = wa+1
  elif x=='TLE':
    tle = tle+1
  else:
    re = re+1
print('AC'+' × '+str(ac))
print('WA'+' × '+str(wa))
print('TLE'+' × '+str(tle))
print('RE'+' × '+str(re))
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 × '+str(ans_ac))
print('WA × '+str(ans_wa))
print('TLE × '+str(ans_tle))
print('RE × '+str(ans_re))
n = int(input())
a = 0
w = 0
t = 0
r = 0
for i in range(n):
  s = input()
  if s == 'AC':
    a+=1
  elif s =='WA':
    w +=1
  elif s =='TLE':
    t +=1
  else:
    r+=1
print('AC × '+str(a))
print('WA × '+str(w))
print('TLE × '+str(t))
print('RE × '+str(r))
from collections import defaultdict
N = int(input())
d = defaultdict(int)

for _ in range(N):
  s = input()
  if s == 'AC':
    d[s] += 1
  elif s == 'WA':
    d[s] += 1
  elif s == 'TLE':
    d[s] += 1
  else:
    d[s] += 1
    
    
for k, v in d.items():
  print('{} x {}'.format(k, d[k]))