Problem:
 Score : 200 points    Problem Statement 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 1 6
AC
TLE
AC
AC
WA
TLE      Sample Output 1 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.       Sample Input 2 10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC      Sample Output 2 AC x 10
WA x 0
TLE x 0
RE x 0

Solution (Python):
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 ", end="")
print(ac)
print("WA x ", end="")
print(wa)
print("TLE x ", end="")
print(tle)
print("RE x ", end="")
print(re)

Solution (Python):
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")))

Solution (Python):
n = int(input())
l = [input() for _ in range(n)]
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')))

Solution (Python):
n=int(input())

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

for _ in range(n):
    aaa=input()
    if aaa=='AC':
        ac+=1
    elif aaa=='WA':
        wa+=1
    elif aaa=='TLE':
        tle+=1
    elif aaa=='RE':
        re+=1


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

Solution (Python):
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('RE x ',S.count('RE'))

Solution (Python):
N=int(input())
box=[0]*4
for i in range(N):
    S=str(input())
    if S=="AC":
        box[0]+=1
    elif S=="WA":
        box[1]+=1
    elif S=="TLE":
        box[2]+=1
    else:
        box[3]+=1
print("AC x ",box[0])
print("WA x ",box[1])
print("TLE x ",box[2])
print("RE x ",box[3])

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

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")))

Solution (Python):
from collections import defaultdict

N = int(input())
d = defaultdict(int)
for i in range(N):
    tmp = input()
    d[tmp] += 1

for i in ["AC","WA","TLE","RE"]:
    print("{} x {}".format(i, d[i]))

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

Solution (Python):
n = int(input())
ls = [0,0,0,0]
for i in range(n):
    ans = str(input())
    if ans == "AC": ls[0] += 1 
    if ans == "WA": ls[1] += 1 
    if ans == "TLE": ls[2] += 1 
    if ans == "RE": ls[3] += 1 

print(f'''AC x {ls[0]}
WA x {ls[1]}
TLE x {ls[2]}
RE x {ls[3]}''')

Solution (Python):
m = {}
m['AC'] = 0
m['WA'] = 0
m['TLE'] = 0
m['RE'] = 0

for __ in range(int(input())):
  m[input()] += 1

print('AC x ' + str(m['AC']))
print('WA x ' + str(m['WA']))
print('TLE x ' + str(m['TLE']))
print('RE x ' + str(m['RE']))

Solution (Python):
N=int(input())
S=[]

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

print("AC x {}".format(S.count("AC")))
print("WA x {}".format(S.count("WA")))
print("TLE x {}".format(S.count("TLE")))
print("RE x {}".format(S.count("RE")))

Solution (Python):
from collections import Counter

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

S_co = Counter(S)

print('AC x ' + str(S_co['AC']))
print('WA x ' + str(S_co['WA']))
print('TLE x ' + str(S_co['TLE']))
print('RE x ' + str(S_co['RE']))

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]
cli = [0] * 4
cli[0] = S.count('AC')
cli[1] = S.count('WA')
cli[2] = S.count('TLE')
cli[3] = S.count('RE')
print(f'AC x {cli[0]}')
print(f'WA x {cli[1]}')
print(f'TLE x {cli[2]}')
print(f'RE x {cli[3]}')

Solution (Python):
n=int(input())  

s=[""]*n
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",c0) 
print("WA x",c1) 
print("TLE x",c2) 
print("RE x",c3)

Solution (Python):
N = int(input())
S = list(input() for _ in range(N))
J = ["AC", "WA", "TLE", "RE"]

for judge in J:
    print(judge + " x " + str(S.count(judge)))

Solution (Python):
t=int(input())
f=[]
for i in range(t):
    s=input()
    f.append(s)
print("AC"+' '+'x'+' '+str((f.count("AC"))))
print("WA"+' '+'x'+' '+str((f.count("WA"))))
print("TLE"+' '+'x'+' '+str((f.count("TLE"))))
print("RE"+' '+'x'+' '+str((f.count("RE"))))

Solution (Python):
N = int(input())
S = [0]*N
for i in range(N):
    S[i] = str(input())
result = ['AC','WA','TLE','RE']
resultnum = [0,0,0,0]
for i in range(N):
    if S[i] == result[0]:
        resultnum[0] += 1
    if S[i] == result[1]:
        resultnum[1] += 1
    if S[i] == result[2]:
        resultnum[2] += 1
    if S[i] == result[3]:
        resultnum[3] += 1
for i in range(4):
    print(str(result[i]) + ' x ' + str(resultnum[i]))

Solution (Python):
n=int(input())
c = [0,0,0,0]
for i in range(n):
    s = input()
    if s == 'AC':
        c[0] += 1
    elif s == 'WA':
        c[1] += 1
    elif s == 'TLE':
        c[2] += 1
    else:
        c[3] += 1

print(f'''AC x {c[0]}
WA x {c[1]}
TLE x {c[2]}
RE x {c[3]}''')

Solution (Python):
n = int(input())

ac = wa = tle = 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":
        re += 1

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

Solution (Python):
n = int(input())

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

Solution (Python):
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))

Solution (Python):
import random
from functools import lru_cache
import math

def solve():
    n = int(input())
    hmap = {'AC': 0, 'TLE': 0, 'WA': 0, 'RE': 0}
    
    for _ in range(n):
        s = input()
        hmap[s] += 1
    
    print('AC x', hmap.get('AC',0))
    print('WA x', hmap.get('WA',0))
    print('TLE x', hmap.get('TLE',0))
    print('RE x', hmap.get('RE',0))

t = 1
for _ in range(t):
    solve()

Solution (Python):
n = int(input())
a,b,c,d = 0,0,0,0
for i in range(n):
    tmp = input()
    if tmp == 'AC':
        a += 1
    if tmp == 'WA':
        b += 1
    if tmp == 'TLE':
        c += 1
    if tmp == 'RE':
        d += 1
print('AC x ',a)
print('WA x ',b)
print('TLE x ',c)
print('RE x ',d)

Solution (Python):
N = int(input())
S = [input()for _ in range(N)]

AC, WA, TLE, RE = (0,0,0,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('AC x {}'.format(AC))
print('WA x {}'.format(WA))
print('TLE x {}'.format(TLE))
print('RE x {}'.format(RE))

Solution (Python):
from collections import defaultdict
n = int(input())
d = defaultdict(int)
for i in range(n):
    d[input()] += 1
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(i+' x '+str(d[i]))

Solution (Python):
import sys
import math
def get_array(): return list(map(int, sys.stdin.readline().strip().split()))
def get_ints(): return map(int, sys.stdin.readline().strip().split())
def input(): return sys.stdin.readline().strip()
n=int(input())
count=0
flag=0
tag=0
bsdk=0
for i in range(n):
    s=input()
    if s=="AC":
        count=count+1
    elif s=="WA":
        flag=flag+1
    elif s=="TLE":
        tag=tag+1
    else:
        bsdk=bsdk+1
print("AC x",count)
print("WA x",flag)
print("TLE x",tag)
print("RE x",bsdk)

Solution (Python):
import collections
N = int(input())
S = [input() for _ in range(N)]
Scol = collections.Counter(S)

if 'AC' in Scol:
    AC = Scol['AC']
else:
    AC = 0

if 'WA' in Scol:
    WA = Scol['WA']
else:
    WA = 0

if 'TLE' in Scol:
    TLE = Scol['TLE']
else:
    TLE = 0

if 'RE' in Scol:
    RE = Scol['RE']
else:
    RE = 0

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

Solution (Python):
N=int(input())
List=[input() for i in range(N)]
a=0
b=0
c=0
d=0
for i in range(0,N):
    if List[i]=="AC":
        a+=1
    elif List[i]=="WA":
        b+=1
    elif List[i]=="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))

Solution (Python):









def main():
    n = int(input())
    ac,wa,tle,re = 0,0,0,0
    for _ in range(n):
        text = input()
        if text == 'AC':
            ac += 1
        elif text == 'WA':
            wa += 1
        elif text == 'TLE':
            tle += 1
        else:
            re += 1
    print("AC x %d"%ac)
    print("WA x %d"%wa)
    print("TLE x %d"%tle)
    print("RE x %d"%re)



if __name__ == '__main__':
    main()

Solution (Python):
x=int(input())
a=0
w=0
t=0
r=0
for i in range(x):
    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)

Solution (Python):
ans = [0 for i in range (4)]
num = int(input())
for i in range (num):
    inp = input()
    if inp == 'AC':
        ans[0] += 1
    elif inp =='WA':
        ans[1] +=1
    elif inp == 'TLE':
        ans[2] += 1
    elif inp == 'RE':
        ans[3] += 1
print ('AC x {}'.format(ans[0]))
print ('WA x {}'.format(ans[1]))
print ('TLE x {}'.format(ans[2]))
print ('RE x {}'.format(ans[3]))

Solution (Python):
def readinput():
    n=int(input())
    s=[]
    for _ in range(n):
        s.append(input())
    return n,s

def main(n,s):
    ac=0
    wa=0
    tle=0
    re=0
    for ret in s:
        if ret=='AC':
            ac+=1
        elif ret=='WA':
            wa+=1
        elif ret=='TLE':
            tle+=1
        elif ret=='RE':
            re+=1
    print('AC x {}'.format(ac))
    print('WA x {}'.format(wa))
    print('TLE x {}'.format(tle))
    print('RE x {}'.format(re))

if __name__=='__main__':
    n,s=readinput()
    main(n,s)

Solution (Python):
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0

for i in range(N):
    S = input()
    if S == 'AC':
        ac += 1
    if S == 'WA':
        wa += 1
    if S == 'TLE':
        tle += 1
    if S == 'RE':
        re += 1

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

Solution (Python):
N = int(input())
ans = [0,0,0,0]
for i in range(N):
    S = input()
    if S == "AC":
        ans[0] += 1
    elif S == "WA":
        ans[1] += 1
    elif S == "TLE":
        ans[2] += 1
    elif S == "RE":
        ans[3] += 1

print("AC x {}".format(ans[0]))
print("WA x {}".format(ans[1]))
print("TLE x {}".format(ans[2]))
print("RE x {}".format(ans[3]))

Solution (Python):
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)

Solution (Python):
import sys
def Ii():return int(sys.stdin.readline())
def Mi():return map(int,sys.stdin.buffer.readline().split())
def Li():return list(map(int,sys.stdin.buffer.readline().split()))

n = Ii()
ac = 0
wa = 0
tle = 0
re = 0

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

Solution (Python):








def solve(N, Ss):
    cntAC, cntWA, cntTLE, cntRE = 0, 0, 0, 0
    cntJudge = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
    for S in Ss:
        cntJudge[S] += 1
    print('AC x ' + str(cntJudge['AC']))
    print('WA x ' + str(cntJudge['WA']))
    print('TLE x ' + str(cntJudge['TLE']))
    print('RE x ' + str(cntJudge['RE']))


if __name__ == '__main__':
    
    N = int(input())
    
    
    
    Ss = [input() for _ in range(N)]
    solve(N, Ss)

Solution (Python):
N = int(input())
s = list()
for _ in range(N):
  s.append(input())
for result in ("AC","WA","TLE","RE"):
	print(f"{result} x {s.count(result)}")

Solution (Python):
n=int(input())
a=0
w=0
t=0
r=0
for i in range(n):
  b=input()
  if b=="AC":
    a+=1
  elif b=="WA":
    w+=1
  elif b=="TLE":
    t+=1
  elif b=="RE":
    r+=1
print("AC x",a)
print("WA x",w)
print("TLE x",t)
print("RE x",r)

Solution (Python):
N = int(input())

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

for _ in range(N):
    S = input()
    results[S] += 1



for result, num in results.items():
    print(result,"x", num)

Solution (Python):
ans = [0,0,0,0]
N = int(input())
for i in range(N):
    S = input()
    if S == "AC":
        ans[0] += 1
    if S == "WA":
        ans[1] += 1
    if S == "TLE":
        ans[2] += 1
    if S == "RE":
        ans[3] += 1
print("AC x "+str(ans[0]))
print("WA x "+str(ans[1]))
print("TLE x "+str(ans[2]))
print("RE x "+str(ans[3]))

Solution (Python):
N = int(input())
S = ['']*N
for T in range(0,N):
    S[T] = input()
print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(S.count('AC'),S.count('WA'),S.count('TLE'),S.count('RE')))

Solution (Python):
N=int(input())
S=[]
for i in range(N):
    S+=[input()]

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

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

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

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

if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
dic = {}
dic["AC"] = 0
dic["WA"] = 0
dic["TLE"] = 0
dic["RE"] = 0

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

print('AC x '+str(dic['AC']))
print('WA x '+str(dic['WA']))
print('TLE x '+str(dic['TLE']))
print('RE x '+str(dic['RE']))

Solution (Python):

from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement


t = defaultdict(int)
n = int(input())
for i in range(n):
    s = input()
    t[s]+=1
print("AC x "+str(t["AC"]))
print("WA x "+str(t["WA"]))
print("TLE x "+str(t["TLE"]))
print("RE x "+str(t["RE"]))

Solution (Python):
N = int(input())

ans = dict()
ans['AC'] = 0
ans['WA'] = 0
ans['TLE'] = 0
ans['RE'] = 0
for i in range(N):
    S = input()
    ans[S] += 1
        
print("AC x", ans['AC'])
print("WA x", ans['WA'])
print("TLE x", ans['TLE'])
print("RE x", ans['RE'])

Solution (Python):
a=b=c=d=0
for _ in range(int(input())):
  s=input()
  if s=='AC':
    a+=1
  elif s=='WA':
    b+=1
  elif s=='TLE':
    c+=1
  else:
    d+=1
 
print('AC x',a)
print('WA x',b)
print('TLE x',c)
print('RE x',d)

Solution (Python):
import sys
sys.setrecursionlimit(10**9)

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

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

    for i_a in a:
        for j_C, j_num in C.items():
            if i_a == j_C:
                C[j_C] = j_num + 1

    for j_C, j_num in C.items():
        print('%s x %s' % (j_C, j_num))
    return


if __name__ == "__main__":
    main()
    sys.exit(0)

Solution (Python):
def main():
    N = int(input())
    d = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    for n in range(N):
        d[input()] += 1

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


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]

ans = {'AC': 0, 'WA': 0, 'TLE':0, 'RE':0}
for s in S:
    ans[s] += 1

for s in ('AC','WA','TLE','RE'):
    print(f'{s} x {ans[s]}')

Solution (Python):
import sys
import numpy as np
import math
import collections
from collections import deque 
from functools import reduce


n = int(input())
rs = list(input() for i in range(n))

cn = collections.Counter(rs)

print("AC x {0}".format(cn["AC"]))
print("WA x {0}".format(cn["WA"]))
print("TLE x {0}".format(cn["TLE"]))
print("RE x {0}".format(cn["RE"]))

Solution (Python):
num = int(input())
pattern = {"AC":0, "WA":1, "TLE":2, "RE":3}
result = [0, 0, 0, 0]
for i in range(num):
  si = input()
  result[pattern[si]] += 1

print("AC x {0}".format(result[0]))
print("WA x {0}".format(result[1]))
print("TLE x {0}".format(result[2]))
print("RE x {0}".format(result[3]))

Solution (Python):
ls = [0]*4
n = int(input())

for i in range(n):
  s = input()
  if s == "AC":
    ls[0]+=1
  elif s=="WA":
    ls[1]+=1
  elif s == "TLE":
    ls[2]+=1
  else:
    ls[-1]+=1
    
  
  

print("AC x "+str(ls[0]))
print("WA x "+str(ls[1]))
print("TLE x "+str(ls[2]))
print("RE x "+str(ls[3]))

Solution (Python):
n = int(input())
dict = {}
dict["AC"] = 0
dict["WA"] = 0
dict["TLE"] = 0
dict["RE"] = 0
for _ in range(n):
    s = input()
    dict[s] = dict.get(s, 0) + 1
print("AC x {}".format(dict["AC"]))
print("WA x {}".format(dict["WA"]))
print("TLE x {}".format(dict["TLE"]))
print("RE x {}".format(dict["RE"]))

Solution (Python):
from collections import Counter

n = int(input())
counts = Counter([input() for _ in range(n)])

print(f'AC x {counts["AC"]}')
print(f'WA x {counts["WA"]}')
print(f'TLE x {counts["TLE"]}')
print(f'RE x {counts["RE"]}')

Solution (Python):
n = int(input())
lis = []
for i in range(n):
    lis.append(input())

print('AC','x',lis.count('AC'))
print('WA','x',lis.count('WA'))
print('TLE','x',lis.count('TLE'))
print('RE','x',lis.count('RE'))

Solution (Python):
N = int(input())
ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

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

for key, value in ans.items():
    print(key + ' x ' + str(value))

Solution (Python):
if __name__ == '__main__':
    n = int(input().strip())
    s_dict = {"AC": 0,
              "WA": 0,
              "TLE": 0,
              "RE": 0}

    for i in range(n):
        s = input().strip()
        s_dict[s] += 1
    print("AC x {}".format(s_dict["AC"]))
    print("WA x {}".format(s_dict["WA"]))
    print("TLE x {}".format(s_dict["TLE"]))
    print("RE x {}".format(s_dict["RE"]))

Solution (Python):
"""
AtCoder :: Beginner Contest 173 :: Judge Status Summary
https://atcoder.jp/contests/abc173/tasks/abc173_b
"""
import sys
from collections import defaultdict


def main():
    """Main program."""
    N = int(sys.stdin.readline())
    freq = defaultdict(int)
    for _ in range(N):
        status = sys.stdin.readline().strip()
        freq[status] += 1

    for status in ['AC', 'WA', 'TLE', 'RE']:
        print("{} x {}".format(status, freq[status]))



if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
List = [str(input()) for i in range(N)]
c0=0
c1=0
c2=0
c3=0
for i in List:
    if i=='AC':
        c0+=1
    elif i=='WA':
        c1+=1
    elif i=='TLE':
        c2+=1
    elif i=='RE':
        c3+=1
print('AC x {}'.format(c0))
print('WA x {}'.format(c1))
print('TLE x {}'.format(c2))
print('RE x {}'.format(c3))

Solution (Python):
N=int(input())
S=[input() for _ 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")))

Solution (Python):
N = int(input())
count = [0, 0, 0, 0]
for i in range(N):
  s = input()
  if s == 'AC':
    count[0] += 1
  elif s == 'WA':
    count[1] += 1
  elif s == 'TLE':
    count[2] += 1
  elif s == 'RE':
    count[3] += 1

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

Solution (Python):
N = int(input())
S = []
for i in range(N):
    S.append(input())

print('AC x {}'.format(S.count('AC')))
print('WA x {}'.format(S.count('WA')))
print('TLE x {}'.format(S.count('TLE')))
print('RE x {}'.format(S.count('RE')))

Solution (Python):
def resolve():
    from collections import defaultdict

    d = defaultdict(int)
    n = int(input())
    for _ in range(n):
        s = input()
        d[s] += 1

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

resolve()

Solution (Python):
N = int(input())
c = [0, 0, 0, 0]
for i in range(N):
  add_s = input()
  if add_s == "AC": c[0] += 1
  elif add_s == "WA": c[1] += 1
  elif add_s == "TLE": c[2] += 1
  else: c[3] += 1

print("AC x " + str(c[0]))
print("WA x " + str(c[1]))
print("TLE x " + str(c[2]))
print("RE x " + str(c[3]))

Solution (Python):
N = int(input())
S = list(input() for _ in range(N))
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)

Solution (Python):
N=int(input())
r=[0,0,0,0]
for i in range(N):
  a=input()
  if a=="AC":
    r[0]+=1
  if a=="WA":
    r[1]+=1
  if a=="TLE":
    r[2]+=1
  if a=="RE":
    r[3]+=1
print("AC x",r[0])
print("WA x",r[1])
print("TLE x",r[2])
print("RE x",r[3])

Solution (Python):
N = int(input())

cnt_AC = 0
cnt_WA = 0
cnt_TLE = 0
cnt_RE = 0

for n in range(N):
    tmp = input()
    if(tmp == 'AC'):
        cnt_AC += 1
    elif(tmp == 'WA'):
        cnt_WA += 1
    elif(tmp == 'TLE'):
        cnt_TLE += 1
    elif(tmp == 'RE'):
        cnt_RE += 1

print('AC x ' + str(cnt_AC))
print('WA x ' + str(cnt_WA))
print('TLE x ' + str(cnt_TLE))
print('RE x ' + str(cnt_RE))

Solution (Python):
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N = I()
    S = [SS() for _ in range(N)]

    result = ('AC', 'WA', 'TLE', 'RE')
    cnt = collections.Counter(S)

    for i in result:
        print(i, 'x', cnt[i])

if __name__ == '__main__':
    resolve()

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

Solution (Python):

from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement


t = defaultdict(int)
n = int(input())
for i in range(n):
    s = input()
    t[s]+=1
print("AC x "+str(t["AC"]))
print("WA x "+str(t["WA"]))
print("TLE x "+str(t["TLE"]))
print("RE x "+str(t["RE"]))

Solution (Python):


import collections

n = int(input())


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

c = collections.Counter
ans = c(s)

case = ['AC', 'WA', 'TLE', 'RE']

for c in case:
    if c in ans.keys():
        res = ans[c]
    else:
        res = 0
    print(c, 'x', res)

Solution (Python):
import sys
from collections import Counter
def I(): return int(sys.stdin.readline().rstrip())
def S(): return sys.stdin.readline().rstrip()

N = I()
S_list = [S() for i in range(N)]

counter = Counter()
for ss in S_list:
    counter[ss] += 1

for ss in ["AC", "WA", "TLE", "RE"]:
    print("{} x {}".format(ss, counter[ss]))

Solution (Python):
n = int(input())
s = []
for i in range(n):
  s.append(input())
  
print('AC x {}'.format(s.count('AC')))
print('WA x {}'.format(s.count('WA')))
print('TLE x {}'.format(s.count('TLE')))
print('RE x {}'.format(s.count('RE')))

Solution (Python):
N = int(input())

RE = ["AC","WA","TLE","RE"]
cnt = [0,0,0,0]

for i in range(N):
    re = input()
    for j in range(4):
        if re == RE[j]:
            cnt[j] += 1

for j in range(4):
    print(RE[j] + " x " + str(cnt[j]))

Solution (Python):
import sys

input = sys.stdin.readline

if __name__ == '__main__':
  n=int(input())
  C={'AC':0,'WA':0,'TLE':0,'RE':0}
  for _ in range(n):
    s=input().strip("\n")
    C[s]+=1
  print('AC x '+str(C['AC']))
  print('WA x '+str(C['WA']))
  print('TLE x '+str(C['TLE']))
  print('RE x '+str(C['RE']))

Solution (Python):
N = int(input())
count = []
for i in range(4):
    count.append(0)

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

print("AC x", count[0])
print("WA x", count[1])
print("TLE x", count[2])
print("RE x", count[3])

Solution (Python):
N = int(input())
S = {"AC":0, "WA":0, "TLE":0, "RE":0}
for i in range(N):
    S[input()] += 1

print("AC x",S["AC"])
print("WA x",S["WA"])
print("TLE x",S["TLE"])
print("RE x",S["RE"])

Solution (Python):
from collections import Counter
n = int(input().strip())
L = [input().strip() for _ in range(n)]


cnt=Counter(L)
for x in ["AC", "WA", "TLE", "RE"]:
    print(x+" x "+str(cnt[x]))

Solution (Python):
n=int(input())
li=["AC","WA","TLE","RE"]
out=[0]*4
for i in range(n):
  x=input()
  for (j,k)in zip(range(4),li):
    if x==k:
      out[j]+=1
      break
for (x,y)in zip(li,out):
  print("{} x {}".format(x,y))

Solution (Python):
from collections import defaultdict
v = defaultdict(int)
for _ in range(int(input())):
    v[input()]+=1
print('AC x',v['AC'])
print('WA x',v['WA'])
print('TLE x',v['TLE'])
print('RE x',v['RE'])

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

if __name__ == "__main__":
  resolve()

Solution (Python):
num = (int)(input())
ans = [0, 0, 0, 0]
for i in range(num):
  temp = input()
  if temp == "AC":
    ans[0] += 1
  elif temp == "WA":
    ans[1] += 1
  elif temp == "TLE":
    ans[2] += 1
  else:
    ans[3] += 1
print("AC x " + (str)(ans[0]))
print("WA x " + (str)(ans[1]))
print("TLE x " + (str)(ans[2]))
print("RE x " + (str)(ans[3]))

Solution (Python):

def main():
  n = int(input())
  ss = [input() for _ in range(n)]
  
  from collections import Counter
  
  cc = Counter(ss)
  
  kk = ["AC", "WA", "TLE", "RE"]
  
  for k in kk:
    if k in cc:
      print(f"{k} x {cc[k]}")
    else:
      print(f"{k} x 0")


if __name__ == "__main__":
  main()

Solution (Python):
n = int(input())

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

for i in range(n):
  result = input()
  if result == "AC":
    ac += 1
  elif result == "WA":
    wa += 1
  elif result == "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))

Solution (Python):
N = int(input())

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

C = [0] * 4

for s in S:
    if s == "AC":
        C[0] += 1
    elif s == "WA":
        C[1] += 1
    elif s == "TLE":
        C[2] += 1
    else:
        C[3] += 1


print("AC x " + str(C[0]))
print("WA x " + str(C[1]))
print("TLE x " + str(C[2]))
print("RE x " + str(C[3]))

Solution (Python):
N=int(input())
S=[]
for i 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('RE x ',S.count('RE'))

Solution (Python):
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

a=str(a)
w=str(w)
t=str(t)
r=str(r)
print('AC','x',a)
print('WA','x',w)
print('TLE','x',t)
print('RE','x',r)

Solution (Python):
n=int(input())
I={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  I[input()]+=1
print("AC x {}".format(I["AC"]))
print("WA x {}".format(I["WA"]))
print("TLE x {}".format(I["TLE"]))
print("RE x {}".format(I["RE"]))

Solution (Python):
N = int(input())

D = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(N):
    x = input()
    if x == "AC":
        D["AC"] += 1 
    elif x == "WA":
        D["WA"] += 1
    elif x == "TLE":
        D["TLE"] += 1
    else:
        D["RE"] += 1

print("AC x", D["AC"])
print("WA x", D["WA"])
print("TLE x", D["TLE"])
print("RE x", D["RE"])

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]

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
    else:
        pass

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

Solution (Python):
from collections import Counter
N = int(input())
d = {'AC':0,
     'WA':0,
     'TLE':0,
     'RE':0}
for key,value in Counter([input() for _ in range(N)]).items():
    d[key]=value

for key,value in d.items():
    print(key,'x',value)

Solution (Python):
N = int(input())
S = tuple(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')))

Solution (Python):
test = int(input())

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


for i in range(test):
    n = input()

    if n == "AC":
        ac += 1

    if n == "WA":
        wa += 1

    if n == "TLE":
        tle += 1

    if n == "RE":
        re += 1




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

Solution (Python):
n=int(input())
s_list=[input() for _ in range(n)]

AC_cnt = 0
WA_cnt = 0
TLE_cnt = 0
RE_cnt = 0

for i in range(n):
    if s_list[i] == 'AC':
        AC_cnt += 1
    elif s_list[i] == 'WA':
        WA_cnt += 1
    elif s_list[i] == 'TLE':
        TLE_cnt += 1
    elif s_list[i] == 'RE':
        RE_cnt += 1

print('AC x ' + str(AC_cnt))
print('WA x ' + str(WA_cnt))
print('TLE x ' + str(TLE_cnt))
print('RE x ' + str(RE_cnt))

Solution (Python):
n=int(input())
s=[0,0,0,0]
for i in range(n):
    si=input()
    if si=='AC':
        s[0]+=1
    elif si=='WA':
        s[1]+=1
    elif si=='TLE':
        s[2]+=1
    else:
        s[3]+=1
print(f'AC x {s[0]}')
print(f'WA x {s[1]}')
print(f'TLE x {s[2]}')
print(f'RE x {s[3]}')