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):
def main():
    n = int(input())

    r = [0, 0, 0, 0]
    for _ in range(n):
        i = input()

        if i == 'AC':
            r[0] += 1
        elif i == 'WA':
            r[1] += 1
        elif i == 'TLE':
            r[2] += 1
        else:
            r[3] += 1

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


if __name__ == '__main__':
    main()

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

Solution (Python):
hashmap = {'AC':0,'WA':0,'TLE':0,'RE':0}
N = int(input())
for _ in range(N):
    s = input()
    hashmap[s]+=1
for k,v in hashmap.items():
    print(k,'x',str(v))

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

Solution (Python):
n=int(input())
a=0
b=0
c=0
d=0
while n:
    n-=1
    s=input()
    if(s=='AC'):a+=1
    if(s=='WA'):b+=1
    if(s=='TLE'):c+=1
    if(s=='RE'):d+=1
print('AC x %d'%a)
print('WA x %d'%b)
print('TLE x %d'%c)
print('RE x %d'%d)

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

Solution (Python):
n = int(input())
s = ["AC", "WA", "TLE", "RE"]
s2 = [0, 0, 0, 0]
for i in range(n):
    s2[s.index(input())] += 1

print("AC x %d\nWA x %d\nTLE x %d\nRE x %d" % (s2[0], s2[1], s2[2], s2[3]))

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

from collections import Counter

c = Counter(A)

judge = ["AC", "WA", "TLE", "RE"]
for j in judge:
    if j in c:
        k = c[j]
    else:
        k = 0

    print(f"{j} x {k}")

Solution (Python):



N = int(input())

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

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

for k,v in result.items():
    print(k + " x " + str(v))

Solution (Python):
import collections
n=int(input())
s=[]
for i in range(n):
    s.append(input())
a=collections.Counter(s)

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

Solution (Python):
import numpy as np
import math
import scipy as sp
import queue
import collections

MOD = 10 ** 9 + 7
INF = 10 ** 9

def main(kwargs):
    S = kwargs["S"]
    cnt = collections.Counter(S)
    res = "AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(cnt["AC"], cnt["WA"], cnt["TLE"], cnt["RE"])
    return res

if __name__ == "__main__":
    kwargs = {}

    cin = input().split()
    kwargs["n"] = [int(i) for i in cin][0]

    kwargs["S"] = []
    for i in range(kwargs["n"]):
        cin = input().split()
        s = cin[0]
        kwargs["S"].append(s)

    cout = main(kwargs)
    print(cout)

Solution (Python):
n=int(input())
c0=0
c1=0
c2=0
c3=0
for c in range(n):
    s=input()
    if s=="AC":
        c0+=1
    elif s=="WA":
        c1+=1
    elif s=="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))

Solution (Python):
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("AC x {}".format(AC))
print("WA x {}".format(WA))
print("TLE x {}".format(TLE))
print("RE x {}".format(RE))

Solution (Python):
n = int(input())
dic = dict()
dic["AC"] = 0
dic["WA"] = 0
dic["TLE"] = 0
dic["RE"] = 0

for i in range(n):
    x = input()
    dic[x] += 1
print("AC x", dic["AC"])
print("WA x", dic["WA"])
print("TLE x", dic["TLE"])
print("RE x", dic["RE"])

Solution (Python):
import collections

n = int(input())

s = []

for _ in range(n):
    s.append(input())

s_total = dict(collections.Counter(s))

print("AC x", s_total.get("AC", default=0))
print("WA x", s_total.get("WA", default=0))
print("TLE x", s_total.get("TLE", default=0))
print("RE x", s_total.get("RE", default=0))

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())
s=[input() for _ in range(n)]
ac,wa,tle,re=0,0,0,0

for i in s:
    if i=="AC":
        ac+=1

    elif i=="WA":
        wa+=1

    elif i=="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))

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

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

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

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

res = [0 for x in range(4)]

for i in range(N):
    a = input()
    if a == 'AC':
        res[0] += 1
    elif a == 'WA':
        res[1] += 1
    elif a == 'TLE':
        res[2] += 1
    else:
        res[3] += 1


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

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

for s in S:
    count = data.get(s, 0)
    data[s] = count + 1

for s in ['AC', 'WA', 'TLE', 'RE']:
    print(f"{s} x {data.get(s, 0)}")

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

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

Solution (Python):
n=int(input())
a=[input() for _ in range(n)]
for s in ['AC', 'WA', 'TLE', 'RE']:
  print(s,'x',a.count(s))

Solution (Python):

def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n):return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)








n=n0()
s=s2(n)

ac=0
tle=0
wa=0
re=0
for a in s:
    if a=="AC":
        ac+=1
    elif a=="TLE":
        tle+=1
    elif a=="WA":
        wa+=1
    else:
        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())
lst = [0,0,0,0] 


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

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

Solution (Python):
import sys

n = int(sys.stdin.readline())
results = {
    "AC": 0,
    "WA": 0,
    "TLE": 0,
    "RE": 0,
}
for _ in range(n):
    res = input()
    results[res] += 1
for key, value in results.items():
    print("%s x %d" % (key, value))

Solution (Python):

printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True 
BIG = 10**18
R = 10**9 + 7


def ddprint(x):
  if DBG:
    print(x)

n = inn()
ac = wa = tle = re = 0
for i in range(n):
    s = ins()
    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))

Solution (Python):
N = int(input())
c1,c2,c3,c4 = 0,0,0,0
for i in range(N):
    S = input()
    if S == "AC":
        c1 += 1
    if S == "WA":
        c2 += 1
    if S == "TLE":
        c3 += 1
    if S == "RE":
        c4 += 1

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

Solution (Python):
n=int(input())
s=[]
c0=0
c1=0
c2=0
c3=0
for i in range(n):
    s=input()

    if s=="AC":
        c0+=1
    if s=="WA":
        c1+=1
    if s=="TLE":
        c2+=1
    if s=="RE":
        c3+=1
print("AC x",c0)
print("WA x",c1)
print("TLE x",c2)
print("RE x",c3)

Solution (Python):
import collections 
d=collections.defaultdict(int) 
n=int(input())
for i in range(n):
	d[input()]+=1 

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

Solution (Python):
import collections

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

c = collections.Counter(ab)

print('AC x',c['AC'])
print('WA x',c['WA'])
print('TLE x',c['TLE'])
print('RE x',c['RE'])

Solution (Python):
n = int(input())
l = [input() for i in range(n)]
print('AC x', l.count('AC'))
print('WA x', l.count('WA'))
print('TLE x', l.count('TLE'))
print('RE x', l.count('RE'))

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

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

for _ in range(n):
    s = input()

    if s == kekka[0]:
        ans[0] += 1
    elif s == kekka[1]:
        ans[1] += 1
    elif s == kekka[2]:
        ans[2] += 1
    elif s == kekka[3]:
        ans[3] += 1

for i in range(4):
    print(kekka[i]+" x ",end="")
    print(ans[i])

Solution (Python):


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

    C = [0,0,0,0]

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

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



if __name__ == '__main__':
    main()

Solution (Python):
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

n=I()
ac=0
wa=0
tle=0
re=0
for i in range(n):
    s=S()
    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())
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':
        re+=1
    else:
        continue
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())


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

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

slist = [0]*4
for i in range(n):
    result = input()

    if result == "AC":
        slist[0]+=1
    if result == "WA":
        slist[1]+=1
    if result == "TLE":
        slist[2]+=1
    if result == "RE":
        slist[3]+=1

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

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

ac = wa = tle = 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())

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

Solution (Python):
n = int(input())
cnt = [0] * 4
for _ in range(n):
    j = input()
    if j == "AC":
        cnt[0] += 1
    elif j == "WA":
        cnt[1] += 1
    elif j == "TLE":
        cnt[2] += 1
    elif j == "RE":
        cnt[3] += 1

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

Solution (Python):
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
  if s=="WA":
    wa=wa+1
  if s=="TLE":
    tle=tle+1
  if 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))

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

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

Solution (Python):
def main():

    n = int(input())
    ac_count = 0
    wa_count = 0
    tle_count = 0
    re_count = 0

    for _ in range(n):
        s = input()
        if s == "AC":
            ac_count += 1
        elif s == "WA":
            wa_count += 1
        elif s == "TLE":
            tle_count += 1
        else:
            re_count += 1
        
    print("AC x {}".format(ac_count))
    print("WA x {}".format(wa_count))
    print("TLE x {}".format(tle_count))
    print("RE x {}".format(re_count))

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
li = []

sumac = 0
sumwa = 0
sumtle = 0
sumre = 0

for i in range(n):
    case = input()
    if (case == "AC"):
        sumac += 1
    elif (case == "WA"):
        sumwa += 1
    elif (case == "TLE"):
        sumtle += 1
    else:
        sumre += 1

print("AC x " + str(sumac))
print("WA x " + str(sumwa))
print("TLE x " + str(sumtle))
print("RE x "+str(sumre))

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', ac)
print('WA x', wa)
print('TLE x', tle)
print('RE x', re)

Solution (Python):
n=int(input())
c=[0]*4
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('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())
dic = {"AC":0,"WA":0,"TLE":0,"RE":0}

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

for k, v in dic.items():
    print(k+" x "+str(v))

Solution (Python):
from collections import Counter
n = int(input())
S = [input() for i in range(n)]

counter = Counter(S)
print('AC x', counter['AC'])
print('WA x', counter['WA'])
print('TLE x', counter['TLE'])
print('RE x', counter['RE'])

Solution (Python):
from collections import Counter

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

cnt=Counter(s)
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):
ac,tle,re,wa=0,0,0,0
for _ in range(int(input())):

    s=(input())
    if s=='AC':
        ac+=1
    if s=='TLE':
        tle+=1
    if s=='RE':
        re+=1
    if s=='WA':
        wa+=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())
d = {"AC":0,"WA":0,"TLE":0,"RE":0}
for n in range(N):
  s = input()
  d[s] += 1
for s in d:
  print(s + " x " + str(d[s]))

Solution (Python):
import sys
from collections import Counter

input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


def main():
    N = int(input())
    S = [input().strip() for _ in range(N)]
    d = Counter(S)
    
    for s in ["AC", "WA", "TLE", "RE"]:
        print("{} x {}".format(s, d[s]))


if __name__ == "__main__":
    main()

Solution (Python):
import math
from collections import defaultdict
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()

"""========main code==============="""

a=ii()
lol=["AC","WA","TLE","RE"]
d=defaultdict(int)
for _ in range(a):
    p=input()
    d[p]+=1
for i in lol:
    print(i,"x",d[i])

Solution (Python):

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

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

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

Solution (Python):
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 ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))

Solution (Python):
import sys

N = int(sys.stdin.readline().strip())
ans = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(N):
    s = sys.stdin.readline().strip()
    ans[s] += 1

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

Solution (Python):

n,*s=open(0).read().split()
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 defaultdict
dd = defaultdict(lambda:0)
n = int(input())
for _ in range(n):
    s = input()
    dd[s] += 1
print('AC x ', dd['AC'])
print('WA x ', dd['WA'])
print('TLE x ', dd['TLE'])
print('RE x ', dd['RE'])

Solution (Python):
from sys  import stdin,stdout

import bisect
import math
def st():
    return list(stdin.readline().strip())

def inp():
    return int(stdin.readline())

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

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

def pr(n):
    stdout.write(str(n)+"\n")

def soe(limit):
    l=[1]*(limit+1)
    prime=[]
    for i in range(2,limit+1):
        if l[i]:
            for j in range(i*i,limit+1,i):
                l[j]=0

    for i in range(2,limit+1):
        if l[i]:
            prime.append(i)
    return prime

def segsoe(low,high):
    limit=int(high**0.5)+1
    prime=soe(limit)
    n=high-low+1
    l=[0]*(n+1)
    for i in range(len(prime)):
        lowlimit=(low//prime[i])*prime[i]
        if lowlimit<low:
            lowlimit+=prime[i]
        if lowlimit==prime[i]:
            lowlimit+=prime[i]
        for j in range(lowlimit,high+1,prime[i]):
            l[j-low]=1
    for i in range(low,high+1):
        if not l[i-low]:
            if i!=1:
                print(i)

def power(a,n):
    r=1
    while n:
        if n&1:
            r=(r*a)
            n=n-1
        else:
            a=(a*a)
            n=n>>1
    return r
    
def solve():
    n=inp()
    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'])
    


solve()

Solution (Python):

from collections import Counter


def solve(*args: str) -> str:
    C = Counter(args[1:])
    ret = []
    for r in ('AC', 'WA', 'TLE', 'RE'):
        ret.append(r+' x '+str(C[r]))
    return '\n'.join(ret)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Solution (Python):


import os
import sys
from io import BytesIO, IOBase

"""
    for _ in range(int(input())):
    n,m=map(int,input().split())
    n=int(input())
    a = [int(x) for x in input().split()]
"""

def main():
    from collections import defaultdict
    ans=defaultdict(int)
    for _ in range(int(input())):
        ans[input()]+=1
    print('AC x '+str(ans['AC']))
    print('WA x '+str(ans['WA']))
    print('TLE x '+str(ans['TLE']))
    print('RE x '+str(ans['RE']))
    




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
S = list()
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())
l=[]
for i in range(n):
  s=input()
  l.append(s)
  
ac=l.count('AC')
wa=l.count('WA')
tle=l.count('TLE')
re=l.count('RE')

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())
a,b,c,d=0,0,0,0
for k in range(n):
    s=str(input())
    if(s=='AC'):
        a+=1
    elif(s=="WA"):
        b+=1
    elif(s=="TLE"):
        c+=1
    elif(s=="RE"):
        d+=1
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)

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 '+str(AC))
print('WA x '+str(WA))
print('TLE x '+str(TLE))
print('RE x '+str(RE))

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

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

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

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

Solution (Python):
from collections import defaultdict
import sys
input = lambda: sys.stdin.readline().rstrip()

num = defaultdict(int)
N = int(input())
for _ in range(N):
    num[input()] += 1
for s in ['AC', 'WA', 'TLE', 'RE']:
    print('{} x {}'.format(s, num[s]))

Solution (Python):
ss = ['AC', 'WA', 'TLE', 'RE']
from collections import Counter
n = int(input())
xx = []
for i in range(n):
    xx.append(input())
dic = Counter(xx)
for s in ss:
    print('{} x {}'.format(s, dic.get(s,0)))

Solution (Python):


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

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

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

d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for s in S:
    d[s] += 1
print('AC x', d['AC'])
print('WA x', d['WA'])
print('TLE x', d['TLE'])
print('RE x', d['RE'])

Solution (Python):

import sys
from collections import defaultdict

def solve(N: int, S: "List[str]"):
    d = defaultdict(int)
    for s in S:
        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"]))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    S = [next(tokens) for _ in range(N)]  
    solve(N, S)

if __name__ == '__main__':
    main()

Solution (Python):


from collections import Counter
n = int(input())
a = [input() for _ in range(n)]
ans = Counter(a)

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

Solution (Python):
ac = 0
wa = 0
tle = 0
re = 0
n = int(input())
for i in range(n):
    a = input()
    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))

Solution (Python):

N = int(input())

l = [0,0,0,0]

for i in range(N):

    t = input()

    if t == "AC":
        l[0] += 1
    elif t == "WA":
        l[1] += 1
    elif t == "TLE":
        l[2] += 1
    else:
        l[3] += 1

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

Solution (Python):
n=int(input())
a=b=c=d=0
for i in range(n):
    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
import collections
input = lambda: sys.stdin.readline().rstrip()

def main():
    n = int(input())
    s = []
    for _ in range(n):
        s.append(input())
    s = collections.Counter(s)
    print('AC x {}'.format(s['AC']))
    print('WA x {}'.format(s['WA']))
    print('TLE x {}'.format(s['TLE']))
    print('RE x {}'.format(s['RE']))
    
if __name__ == '__main__':
    main()

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

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

Solution (Python):
n = int(input())
a = [input() for i in range(n)]
ac=0
wa=0
tle=0
re=0
for i in range(n):
    if a[i]=='AC':
        ac += 1
    if a[i]=='WA':
        wa += 1
    if a[i]=='TLE':
        tle += 1
    if a[i]=='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):
from collections import Counter
N=int(input())
D=Counter()
A=[]
for i in range(N):
  A.append(input())
D=Counter(A)
if "AC" not in D:
  D["AC"]=0
if "WA" not in D:
  D["WA"]=0
if "TLE" not in D:
  D["TLE"]=0
if "RE" not in D:
  D["RE"]=0

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 = []
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):
import collections
n = int(input())
s = [input() for _ in range(n)]
s = collections.Counter(s)
print("AC x " + str(s["AC"]))
print("WA x " + str(s["WA"]))
print("TLE x " + str(s["TLE"]))
print("RE x " + str(s["RE"]))

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

Solution (Python):
def main():
    N = int(input())
    S = {'AC':0,'WA':0,'TLE':0,'RE':0}
    for n in range(N):
        S[str(input())] += 1
        
    tmp = ['AC','WA','TLE','RE']
    for t in tmp:
        print(t+' x '+str(S[t]))
    
if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
results = [input() for _ in range(N)]
cntAC = 0
cntWA = 0
cntTLE = 0
cntRE = 0

for i in results:
    if i == "AC":
        cntAC += 1
    elif i == "WA":
        cntWA += 1
    elif i == "TLE":
        cntTLE += 1
    elif i == "RE":
        cntRE += 1

print("AC x {}".format(cntAC))
print("WA x {}".format(cntWA))
print("TLE x {}".format(cntTLE))
print("RE x {}".format(cntRE))

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

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

for i in range(N):
    stri = str(input())

    if stri == "AC":
        ac += 1
    elif stri == "WA":
        wa += 1
    elif stri == "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))

Solution (Python):
N = int(input())
t = [0]*4
for i in range(N):
  s = input()
  if s == 'AC':
    t[0]+=1
  elif s == 'WA':
    t[1]+=1
  elif s == 'TLE':
    t[2]+=1
  else:
    t[3]+=1


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