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())
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('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)]

from collections import Counter

counter = Counter(S)
for text in ['AC', 'WA', 'TLE', 'RE']:
    print(f"{text} x {counter.get(text, 0)}")

Solution (Python):
n = int(input())
list = [0,0,0,0]

for i in range(n):
  judge = input()
  if judge == 'AC':
    list[0] += 1
  elif judge == 'WA':
    list[1] += 1
  elif judge == 'TLE':
    list[2] += 1
  elif judge == 'RE':
    list[3] += 1
    
print( 'AC x {}'.format(list[0]) )
print( 'WA x {}'.format(list[1]) )
print( 'TLE x {}'.format(list[2]) )
print( 'RE x {}'.format(list[3]) )

Solution (Python):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    now = str(input())
    if now == "AC":
        AC += 1
    elif now == "WA":
        WA += 1
    elif now == "TLE":
        TLE += 1
    elif now == "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):
a=input()
a=int(a)
A=0
W=0
T=0
R=0
for i in range(a):
    b=input()
    if b=="AC":
        A=A+1
    elif b=="WA":
        W=W+1
    elif b=="TLE":
        T=T+1
    elif b=="RE":
        R=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())
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):
def resolve():
    N = int(input())
    AC = 0
    WA = 0
    TLE = 0
    RE = 0

    results = [input() for _ in range(N)]
    for result in results:
        if result == 'AC':
            AC+=1
        elif result == 'WA':
            WA+=1
        elif result == 'TLE':
            TLE+=1
        else:
            RE+=1
    print(f'AC x {AC}\nWA x {WA}\nTLE x {TLE}\nRE x {RE}')

resolve()

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

s = 0  
for k in kara:
    if k =="AC":
        s += 1
print("AC x "+str(s))

t = 0
for k in kara:
    if k =="WA":
        t += 1
print("WA x "+str(t))

z =0
for k in kara:
    if k =="TLE":
        z += 1
print("TLE x "+str(z))

print("RE x " + str(N-s-t-z))

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

Solution (Python):
import sys
n=int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(n):
    moji=input()
    if moji =='AC':
        AC+=1
    elif moji =='WA':
        WA+=1
    elif moji =='TLE':
        TLE+=1
    else:
        RE+=1
A=[AC,WA,TLE,RE]
B=['AC','WA','TLE','RE']
for i in range(4):
    q=A[i]
    print(B[i],end='')
    print(' x ',end='')
    print(q)

Solution (Python):
n = int(input())
ac = wa = tle = re = 0
for _ in range(n):
    x = input()
    if x == 'AC':
        ac += 1
    elif x == 'WA':
        wa += 1
    elif x == 'TLE':
        tle += 1
    elif x == 'RE':
        re += 1

for t, c in [('AC', ac), ('WA', wa), ('TLE', tle), ('RE', re)]:
    print('{0} x {1}'.format(t, c))

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())
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 x %s' %a)
print('WA x %s' %w)
print('TLE x %s' %t)
print('RE x %s' %r)

Solution (Python):
count1=0
count2=0
count3=0
count4=0
N=int(input())
for i in range(N):
  A=input()
  if A=="AC":
    count1=count1+1
  elif A=="WA":
    count2=count2+1
  elif A=="TLE":
    count3=count3+1
  elif A=="RE":
    count4=count4+1
print("AC x "+str(count1))
print("WA x "+str(count2))
print("TLE x "+str(count3))
print("RE x "+str(count4))

Solution (Python):
import collections

N = int(input())
l = []
for i in range(0, N):
  l.append(input())
c = collections.Counter(l)

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

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

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

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

Solution (Python):
from collections import Counter
n = int(input())
s = list(input() for _ in range(n))

s = dict(Counter(s))

print("AC x " + str(s.get("AC", 0)))
print("WA x " + str(s.get("WA", 0)))
print("TLE x " + str(s.get("TLE", 0)))
print("RE x " + str(s.get("RE", 0)))

Solution (Python):
N = int(input())
Ss = [str(input()) for x in range(N)]
r = [0]*4
for s in Ss:
  if s == "AC":
    r[0] += 1
  elif s == "WA":
    r[1] += 1
  elif s == "TLE":
    r[2] += 1
  elif s == "RE":
    r[3] += 1
print("AC x " + str(r[0]))
print("WA x " + str(r[1]))
print("TLE x " + str(r[2]))
print("RE x " + str(r[3]))

Solution (Python):
n = int(input())
ac_c = 0
wa_c = 0
tle_c = 0
re_c = 0
for i in range(n):
    s = input()
    if s == "AC":
        ac_c += 1
    elif s == "WA":
        wa_c += 1
    elif s == "TLE":
        tle_c += 1
    else:
        re_c +=1
print("AC" +" "+ "x"+" " + str(ac_c))
print("WA" +" "+ "x"+" "+ str(wa_c))
print("TLE" +" "+ "x"+" "+ str(tle_c))
print("RE" +" "+ "x"+" "+ str(re_c))

Solution (Python):
n = int(input())
A = 0
B = 0
C = 0
D = 0
for i in range(n):
  x = input()
  if x == "AC":
    A += 1
  elif x == "WA":
    B += 1
  elif x == "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):
n = int(input())
ls = [input() for _ in range(n)]
print("AC x",ls.count("AC"))
print("WA x",ls.count("WA"))
print("TLE x",ls.count("TLE"))
print("RE x",ls.count("RE"))

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

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


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

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

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

for _ 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(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 = [str(input()) for i in range(N)]

cnt_AC = S.count("AC")
cnt_WA = S.count("WA")
cnt_TLE = S.count("TLE")
cnt_RE = S.count("RE")

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):
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 " + str(a))
print("WA x " + str(w))
print("TLE x " + str(t))
print("RE x " + str(r))

Solution (Python):
N = int(input())
d = ('AC', 'WA', 'TLE', 'RE')
S = {k: 0 for k in d}

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

for k in d:
    print(f"{k} x {S[k]}")

Solution (Python):
N = int(input())
S = tuple([input() for _ in range(N)])
AC = 'AC'
acc = 0
WA = 'WA'
wac = 0
TLE = 'TLE'
tlec = 0
RE = 'RE'
rec = 0
for val in S:
    if val == AC:
        acc += 1
    elif val == WA:
        wac += 1
    elif val == TLE:
        tlec += 1
    elif val == RE:
        rec += 1
for i in range(4):
    key = [AC,WA,TLE,RE]
    count = [acc,wac,tlec,rec]
    print("%s x %d"%(key[i],count[i]))

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

for i in range(n):
    judge = input()
    if judge == "AC":
        ans[0] += 1
    elif judge == "WA":
        ans[1] += 1
    elif judge == "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):
t = int(input())
c0, c1, c2, c3 = 0, 0, 0, 0
for i in range(0, t):
    n = input()
    if n == 'AC':
        c0 += 1
    elif n == 'WA':
        c1 += 1
    elif n == 'TLE':
        c2 += 1
    elif n == 'RE':
        c3 += 1
print('AC x ' + str(c0))
print('WA x ' + str(c1))
print('TLE x ' + str(c2))
print('RE x ' + str(c3))

Solution (Python):
ac,tle,wa,re=0,0,0,0
for _ in range(int(input())):
    st = input()
    if st == "AC":
        ac+=1
    elif st == "TLE":
        tle+=1
    elif st == "WA":
        wa+=1
    elif st == "RE":
        re+=1

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

Solution (Python):
import collections

N = int(input())
S = []
for i in range(N):
    S.append(input())
count = collections.Counter(S)

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

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

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

import collections
S2=collections.Counter(S)

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

Solution (Python):
ans=[0,0,0,0]

n=int(input())

for i in range(n):
    x=input()
    if x=="AC":
        ans[0]+=1
    elif x=="WA":
        ans[1]+=1
    elif x=="TLE":
        ans[2]+=1
    elif x=="RE":
        ans[3]+=1
        
print("AC x ",end="")
print(ans[0])
print("WA x ",end="")
print(ans[1])
print("TLE x ",end="")
print(ans[2])
print("RE x ",end="")
print(ans[3])

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

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

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

for k,v in S.items():
    print(f'{k} x {v}')

Solution (Python):
N=int(input())
a=0
t=0
w=0
r=0
for i in range(N):
    p=input()
    if(p=='AC'):
        a=a+1
    elif(p=='TLE'):
        t=t+1
    elif(p=='WA'):
        w=w+1
    else:
        r=r+1
print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print('RE x '+str(r))

Solution (Python):
n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(n):
    inp = input()
    if inp == 'AC':
        AC += 1
    elif inp == 'WA':
        WA += 1
    elif inp == 'TLE':
        TLE += 1
    elif inp == '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=[]
for i in range(n):
    l.append(input())
ac,re,tle,wa=0,0,0,0
for i in range(n):
    if(l[i]=='AC'):
        ac+=1
        
    if(l[i]=='RE'):
        re+=1
        
    if(l[i]=='TLE'):
        tle+=1
        
    if(l[i]=='WA'):
        wa+=1

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

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



TC = ['AC','WA','TLE','RE']
C = [0,0,0,0]

for i in range(N):
    
    result = input()
    if result==TC[0]:
        C[0]+=1
    elif result==TC[1]:
        C[1]+=1
    elif result==TC[2]:
        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 = [None] * N
for i in range(N):
    S[i] = 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):
N=int(input())
ac=0
wa=0
tle=0
re=0

for _ 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())
S = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(N):
    c = input()
    if c in S:
        S[c] += 1

for k, v in S.items():
    print(f"{k} x {v}")

Solution (Python):
N = int(input())
LIST =[input() for _ in range(N)]
AC = LIST.count("AC")
WA = LIST.count("WA")
TLE = LIST.count("TLE")
RE = LIST.count("RE")
print(f"AC x {AC}\nWA x {WA}\nTLE x {TLE}\nRE x {RE}")

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

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

print(f'AC x {cnt_ac}')
print(f'WA x {cnt_wa}')
print(f'TLE x {cnt_tle}')
print(f'RE x {cnt_re}')

Solution (Python):
import collections
N=int(input())
c=collections.Counter()
for i in range(N):
    t=input()
    c[t]+=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']))

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

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

for j in range(n):
  if s[j] == "AC":
    ac += 1
  if s[j] == "WA":
    wa += 1
  if s[j] == "TLE":
    tle += 1
  if s[j] == "RE":
    re += 1
    
    
print("AC x ",ac) 
print("WA x ",wa)
print("TLE x ",tle)
print("RE x ",re)

Solution (Python):
from collections import Counter

N = int(input())

data = list()

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


c = Counter(data)

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

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

count_ac = s.count('AC')
count_wa = s.count('WA')
count_tle = s.count('TLE')
count_re = s.count('RE')

print('AC x', count_ac)
print('WA x', count_wa)
print('TLE x', count_tle)
print('RE x', count_re)

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

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

for s in s_list:
    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):
cases = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(int(input())):
    case = input()
    cases[case] += 1

for case in cases:
    print(f"{case} x {cases[case]}")

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


S = []
AC=0
WA=0
TLE=0
RE = 0
for i in range(n):
    S.append(input())
    if S[i] == "AC":
      AC += 1
    elif S[i] == "WA":
      WA += 1
    elif S[i] == "TLE":
      TLE += 1
    elif S[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
import sys

sys.setrecursionlimit(10 ** 6)

mod = 1000000007
inf = int(1e18)

dx = [0, 1, 0, -1]
dy = [1, 0, -1, 0]


def inverse(a):
    return pow(a, mod - 2, mod)


def usearch(x, a):
    lft = 0
    rgt = len(a) + 1
    while rgt - lft > 1:
        mid = (rgt + lft) // 2
        if a[mid] <= x:
            lft = mid
        else:
            rgt = mid
    return lft



def main():
    n = int(input())
    s = [input() for i in range(n)]
    r = {}
    for x in s:
        r[x] = r.get(x, 0) + 1

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

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
    elif s == "WA":
        WA += 1
    elif s == "TLE":
        TLE += 1
    else:
        RE += 1

print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(AC,WA,TLE,RE))

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

main()

Solution (Python):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    W = input() 
    if W == "AC":
        AC += 1
    elif W == "WA":
        WA += 1
    elif W == "TLE":
        TLE += 1
    elif W == "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=[input() for i in range(n)]
a=0
b=0
c=0 
d=0
for ss in s:
  if ss=='AC':
    a+=1
  elif ss=='WA':
    b+=1
  elif ss=='TLE':
    c+=1
  elif ss=='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 i in range(n)]

ac = wa = tle = re = 0

for s_kind in s:
    if s_kind == "AC":
        ac += 1
    elif s_kind == "WA":
        wa += 1
    elif s_kind == "TLE":
        tle += 1
    elif s_kind == "RE":
        re += 1
    
print("AC x",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",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
    else:
        continue
print('AC x ' + str(count[0]))
print('WA x ' + str(count[1]))
print('TLE x ' + str(count[2]))
print('RE x ' + str(count[3]))

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

cons = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(N):
    tmp = input()
    cons[tmp] += 1
    
print('AC x {}'.format(cons['AC']))
print('WA x {}'.format(cons['WA']))
print('TLE x {}'.format(cons['TLE']))
print('RE x {}'.format(cons['RE']))

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

flaga=0
flagw=0
flagt=0
flagr=0


for _ in range(N):
    K = str(input())

    if(K=='AC'):
        flaga+=1

    if(K=='WA'):
        flagw+=1

    if(K=='TLE'):
        flagt+=1

    if(K=='RE'):
        flagr+=1

print("AC x "+str(flaga))
print("WA x "+str(flagw))
print("TLE x "+str(flagt))
print("RE x "+str(flagr))

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

Solution (Python):
import sys
import numpy as np

read = sys.stdin.read

n = int(input())
s = np.array(read().split(), dtype=object)

print("AC x ",end='')
print(np.count_nonzero(s=="AC"))
print("WA x ",end='')
print(np.count_nonzero(s=="WA"))
print("TLE x ",end='')
print(np.count_nonzero(s=="TLE"))
print("RE x ",end='')
print(np.count_nonzero(s=="RE"))

Solution (Python):
n = int(input())
dic = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(n):
  a = input()
  dic[a] += 1

for k,i in dic.items():
  print(f'{k} x {i}')

Solution (Python):
d={}
for i in range(int(input())):
	verdict=input() 
	if verdict in d:
		d[verdict]+=1
	else:
		d[verdict]=1
print('AC x '+str(d.get('AC',0)))
print('WA x '+str(d.get('WA',0)))
print('TLE x '+str(d.get('TLE',0)))
print('RE x '+str(d.get('RE',0)))

Solution (Python):
n = int(input())
a = 0
b = 0
c = 0
d = 0
for x in range (n):
  word = input()
  if word == 'AC':
    a +=1
    continue
  if word == 'WA':
    b+= 1
  if word == 'TLE':
    c+= 1
  if word == '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)]

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):
def main():
    n = int(input())
    cnt = [0, 0, 0, 0]
    for _ in range(n):
        s = input()
        if s == 'AC':
            cnt[0] += 1
        elif s == 'WA' :
            cnt[1] += 1
        elif s == 'TLE':
            cnt[2] += 1
        elif s == 'RE':
            cnt[3] += 1

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


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
S = []
for _ in range(N):
    S.append(input())
AC_count = 0
WA_count = 0
TLE_count = 0
RE_count = 0
for i in range(N):
    if(S[i]=='AC'):
        AC_count += 1
    if(S[i]=='WA'):
        WA_count += 1
    if(S[i]=='TLE'):
        TLE_count += 1
    if(S[i]=='RE'):
        RE_count += 1
print('AC x ' + str(AC_count))
print('WA x ' + str(WA_count))
print('TLE x ' + str(TLE_count))
print('RE x ' + str(RE_count))

Solution (Python):
N = int(input())
S_list = [input() for _ in range(N)]
res_list = ['AC', 'WA', 'TLE', 'RE']

for res in res_list:
    print(res + ' x ' + str(S_list.count(res)))

Solution (Python):
n = int(input())
ans = [0] * 4
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",ans[0])
print ("WA x",ans[1])
print ("TLE x",ans[2])
print ("RE x",ans[3])

Solution (Python):
n = int(input())
lst = [input() for _ in range(n)]
ac = lst.count("AC")
wa = lst.count("WA")
tle = lst.count("TLE")
re = lst.count("RE")
print(f"AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}")

Solution (Python):
import sys
input = sys.stdin.readline


n = int(input())

A = {"AC":0, "WA":0, "TLE":0, "RE":0}
for _ in range(n):
    s = input().strip()
    A[s] += 1

for k, v in A.items():
    print(k, "x", v)

Solution (Python):
import collections
n = int(input())
s = [input() for _ in range(n)]
s_count = collections.Counter(s)
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())
LIST =[input() for _ in range(N)]
AC = LIST.count("AC")
WA = LIST.count("WA")
TLE = LIST.count("TLE")
RE = LIST.count("RE")
print(f"AC x {AC}\nWA x {WA}\nTLE x {TLE}\nRE x {RE}")

Solution (Python):
l=[]
for i in range(int(input())):
    s=input()
    l.append(s)
a=l.count('AC')
b=l.count('WA')
c=l.count('TLE')
d=l.count('RE')
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_num = str(S.count("AC"))
WA_num = str(S.count("WA"))
TLE_num = str(S.count("TLE"))
RE_num = str(S.count("RE"))

print("AC " + "x " + AC_num)
print( "WA " + "x " + WA_num)
print( "TLE " + "x " + TLE_num)
print( "RE " + "x " + RE_num)

Solution (Python):
import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter

from functools import lru_cache

sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7


def inp():
    '''
    一つの整数
    '''
    return int(input())


def inpl():
    '''
    一行に複数の整数
    '''
    return list(map(int, input().split()))


def str_inp():
    '''
    文字列をリストとして読み込む
    '''
    return list(input()[:-1])


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

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

Solution (Python):
import sys
from collections import defaultdict
dic1 = defaultdict(int)
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0

n = int(readline())

for i in range(n):
    s = readline().rstrip().decode('utf-8')
    dic1[s] += 1

ans = ["AC","WA","TLE","RE"]

for i in ans:
    print(i,"x",dic1[i])

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):
def main():
    total_num = int(input())
    total_list = list()
    for i in range(total_num):
        total_list.append(str(input()))

    str_AC = 'AC'
    int_AC= 0
    str_WA = 'WA'
    int_WA= 0
    str_TLE = 'TLE'
    int_TLE= 0
    str_RE = 'RE'
    int_RE= 0

    for i in total_list:
        if i == str_AC:
            int_AC += 1
        elif i == str_RE:
            int_RE += 1
        elif i == str_TLE:
            int_TLE += 1
        elif i == str_WA:
            int_WA += 1

    print(str_AC + ' x ' + str(int_AC))
    print(str_WA + ' x ' + str(int_WA))
    print(str_TLE + ' x ' + str(int_TLE))
    print(str_RE + ' x ' + str(int_RE))


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i 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())
l=[]
for i in range(n):
    x=input()
    l.append(x)
a=0
b=0
c=0
d=0
for e in l:
    if e=='AC':
        a=a+1
    elif e=='WA':
        b=b+1
    elif e=='TLE':
        c=c+1
    elif e=='RE':
        d=d+1
print("AC x "+str(a))
print("WA x "+str(b))
print("TLE x "+str(c))
print("RE x "+str(d))

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

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




count = [0, 0, 0, 0]

for s in S:
  if s in "AC":
    count[0] += 1
  elif s in "WA" :
    count[1] += 1
  elif s in "TLE" :
    count[2] += 1
  elif s in "RE":
    count[3] += 1
    
print("AC x " + str(count[0]))
print("WA x " + str(count[1]))
print("TLE x " + str(count[2]))
print("RE x " + str(count[3]))

Solution (Python):
n=int(input())
lst=[]
AC=0
WA=0
TLE=0
RE=0
for _ in range(n):
  i=input()
  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)

Solution (Python):
n=int(input())
ac=0
tle=0
wa=0
re=0
for i in range(n):
  s=input()
  if s=='AC':
    ac+=1
  elif s=='TLE':
    tle+=1
  elif s=='WA':
    wa+=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())

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

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())
S = []
T = ["AC", "WA", "TLE", "RE"]
for i in range(N):
    S.append(input())


C = []
for j in T:
    C.append(S.count(j))


for k in range(len(T)):
    print(T[k] + " x " + str(C[k]))

Solution (Python):
a=int(input())
b=0
d=0
e=0
f=0
g=0
while b<a:
    c=input()
    if c=='AC':
        d=d+1
    if c=='WA':
        e=e+1
    if c=='TLE':
        f=f+1
    if c=='RE':
        g=g+1
    b=b+1
print('AC','x',d)
print('WA','x',e)
print('TLE','x',f)
print('RE','x',g)

Solution (Python):
num = int(input())
test = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(num):
    result = input()
    for j in test.keys():
        if result == j:
            test[result] += 1
for i in test:
    print(i, 'x', str(test[i]))

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

Solution (Python):
N= int(input())
s = [input() for i in range(N)] 
C = [0,0,0,0]
for i in range(N):
    if s[i] == "AC":
        C[0] = C[0] + 1
    elif s[i] == "WA":
        C[1] = C[1] + 1
    elif s[i] == "TLE":
        C[2] = C[2] + 1
    else:
        C[3] = 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())
res=[]
for i in range(n):
    res.append(input())

from collections import defaultdict
cnt=defaultdict(int)
cnt["AC"]=0
cnt["TLE"]=0
cnt["WA"]=0
cnt["RE"]=0
for i in res:
    cnt[i]+=1
for i in ["AC","WA","TLE","RE"]:
    print(i,"x",cnt[i])

Solution (Python):

import sys
import numpy as np
import collections

def solve(N: int, S: "List[str]"):
    ans = collections.Counter(S)
    for a in ['AC', 'WA', 'TLE', 'RE']:
        print("{} x {}".format(a, ans[a]))
    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):
N = int(input())
S = []
for i 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):
n = int(input())
d = {'AC':0,'WA':0,'TLE':0,'RE':0}
for j in range(n):
    i = input()
    d[i] += 1

for i in ['AC','WA','TLE','RE']:
    print('%s x %d' % (i, d[i]))

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

Solution (Python):
n = int(input())
list_A = [0]*4
for i in range(n):
    a = input()
    if a == "AC":
        list_A[0]+=1
    elif a == "WA":
        list_A[1]+=1
    elif a == "TLE":
        list_A[2]+=1
    elif a == "RE":
        list_A[3]+=1
print("AC x "+str(list_A[0]))
print("WA x "+str(list_A[1]))
print("TLE x "+str(list_A[2]))
print("RE x "+str(list_A[3]))