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())
result = [input() for i in range(n)]
print('AC x {}'.format(result.count('AC')))
print('WA x {}'.format(result.count('WA')))
print('TLE x {}'.format(result.count('TLE')))
print('RE x {}'.format(result.count('RE')))

Solution (Python):
import sys, collections
N = int(input())
S = [str(input()) for _ in range(N)]
d = collections.Counter(S)
for k in 'AC WA TLE RE'.split():
    print(f'{k} x {d[k]}')

Solution (Python):
count = int(input())
test_str = ['AC', 'WA', 'TLE', 'RE']
result_str = []
flag_list = [0,0,0,0]

for num in range(count):
    result_str.append(input())

for num in range(count):
    for n in range(4):
        if result_str[num] == test_str[n]:
            flag_list[n] = flag_list[n] + 1

for n in range(4):
    print("{} x {}".format(test_str[n], flag_list[n]))

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

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

print("AC x "+str(a.count("AC")))
print("WA x "+str(a.count("WA")))
print("TLE x "+str(a.count("TLE")))
print("RE x "+str(a.count("RE")))

Solution (Python):
test = int(input())
l = []
for i in range(test):
    l.append(str(input()))
wrong = l.count('WA')
accepted = l.count('AC')
tle = l.count('TLE')
re = l.count('RE')
print('AC x', str(accepted))
print('WA x', str(wrong))
print('TLE x', str(tle))
print('RE x', str(re))

Solution (Python):
import sys
N = int(input())
s = [input() for i in range(N)]
    
a = s.count("AC")
b = s.count("WA")
c = s.count("TLE")
d = s.count("RE")
 
print("AC"+" x "+str(a))
print("WA"+" x "+str(b))
print("TLE"+" x "+str(c))
print("RE"+" x "+str(d))

Solution (Python):
n = int(input())
AC, WA, TLE, RE = 0, 0, 0, 0
while n != 0:
  i = input()
  if i == 'AC':
  	AC += 1
  elif i == 'WA':
    WA += 1
  elif i == 'TLE':
    TLE += 1
  elif i == 'RE':
    RE += 1
  n -= 1
print("AC x",AC)
print("WA x",WA)
print("TLE x",TLE)
print("RE x",RE)

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

cnt_dict = {"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(N):
    s = input()
    cnt_dict[s] += 1

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

Solution (Python):
dic={'AC':0,'WA':0,'TLE':0,'RE':0}
for _ in range(int(input())) :
  dic[input()]+=1
for key,val in dic.items() :
  print(key+" x " +str(val))

Solution (Python):

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

for k, v in dict1.items():
	print(k+' x '+str(v))

Solution (Python):
import collections
N=int(input())
lis = [input() for i in range(N)]
lis2=["AC", "WA", "TLE", "RE" ]
for w in lis2:
    ans=collections.Counter(lis)
    print("{} x {}".format(w,ans[w]))

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

n_ac = 0
n_wa = 0
n_tle = 0
n_re = 0

for st in s:
    if st == 'AC':
        n_ac += 1
    if st == 'WA':
        n_wa += 1
    if st == 'TLE':
        n_tle += 1
    if st == 'RE':
        n_re += 1

print(f'AC x {n_ac}')
print(f'WA x {n_wa}')
print(f'TLE x {n_tle}')
print(f'RE x {n_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):
import math
import collections
import fractions
import itertools
import functools
import operator

def solve():
    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")))
    return 0

if __name__ == "__main__":
    solve()

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

for c in range(N):
	S[c] = input()

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

for c in S_:
	print("{} x {}".format(c, S.count(c)))

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

N=int(readline())

from collections import defaultdict
dic = defaultdict(int)

for i in range(N):
  dic[readline().rstrip()] += 1
  
print("AC x",dic["AC"])
print("WA x",dic["WA"])
print("TLE x",dic["TLE"])
print("RE x",dic["RE"])

Solution (Python):
import sys

def main():
	N = int(input())
	L = [input() for i in range(N)]
	print('AC x {0}'.format(L.count('AC')))
	print('WA x {0}'.format(L.count('WA')))
	print('TLE x {0}'.format(L.count('TLE')))
	print('RE x {0}'.format(L.count('RE')))
	

if __name__ == "__main__":
	main()

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

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

c_ac = 0
c_wa = 0
c_tle = 0
c_re = 0

for i in range(n):
    s = input()
    if s == "AC":
        c_ac += 1
    elif s == "WA":
        c_wa += 1
    elif s == "TLE":
        c_tle += 1
    else:
        c_re += 1

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())
result = [input() for i in range(n)]

ans = [0,0,0,0]

for i in range(n):
    if result[i] == "AC":
        ans[0] += 1
    elif result[i] == "WA":
        ans[1] += 1
    elif result[i] == "TLE":
        ans[2] += 1
    elif result[i] == "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())
c = [0, 0, 0, 0]
for i in range(n):
  judge = input()
  if judge == 'AC':
    c[0] = c[0] + 1
  if judge == 'WA':
    c[1] = c[1] + 1
  if judge == 'TLE':
    c[2] = c[2] + 1
  if judge == 'RE':
    c[3] = c[3] + 1
print('AC x',c[0])
print('WA x',c[1])
print('TLE x',c[2])
print('RE x',c[3])

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

Solution (Python):
N = int(input())
SAC = 0
SWA = 0
STLE = 0
SRE = 0
for i in range(N):
  tmp = input()
  if tmp == 'AC':
    SAC += 1
  elif tmp == 'WA':
    SWA += 1
  elif tmp == 'TLE':
    STLE += 1
  elif tmp == 'RE':
    SRE += 1

print("AC x " + str(SAC))
print("WA x "+ str(SWA))
print("TLE x "+str(STLE))
print("RE x "+str(SRE))

Solution (Python):
from collections import defaultdict as dd
N=int(input())
S = [input() for _ in range(N)]
dic = dd(int)
for s in S:
    dic[s] += 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):
n = int(input())
A = [list(map(str, input().split())) for _ in range(n)]

ac_cnt = 0
wa_cnt = 0
tle_cnt = 0
re_cnt = 0
for i in range(n):
    if A[i][0] == "AC":
        ac_cnt += 1
    if A[i][0] == "WA":
        wa_cnt += 1
    if A[i][0] == "TLE":
        tle_cnt += 1
    if A[i][0] == "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())
a=0
b=0
c=0
d=0


for i in range(N):
    
    j=str(input())
    if j=="AC":
      a+=1
    elif j=="WA":
      b+=1
    elif j=="TLE":
      c+=1
    elif j=="RE":
      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())
a = 0
w = 0
t = 0
r = 0
for i in range(n):
    result = input()
    if result == "AC":
        a += 1
    elif result == "WA":
        w += 1
    elif result == "TLE":
        t += 1
print ("AC x "+ str(a))
print ("WA x "+ str(w))
print ("TLE x "+ str(t))
print ("RE x "+ str(n -(a + w + t)))

Solution (Python):
n = int(input())
cAC, cWA, cTLE, cRE = 0, 0, 0, 0
for i in range(n):
  s = str(input())
  if s == 'AC':
    cAC += 1
  elif s == 'WA':
    cWA += 1
  elif s == 'TLE':
    cTLE += 1
  else:
    cRE += 1
print("AC x", cAC)
print("WA x", cWA)
print("TLE x", cTLE)
print("RE x", cRE)

Solution (Python):
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline

n = int(readline())
s = read().rstrip().decode('utf-8')

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

print("AC x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)

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

import collections

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

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

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

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('{} x {}'.format(i, d[i]))

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

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

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

for i in S:
    if i == judgelist[0]:
        AC+=1
    elif i == judgelist[1]:
        WA+=1
    elif i == judgelist[2]:
        TLE+=1
    elif i == judgelist[3]:
        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 i in range(N)]
a = s.count("AC")
b = s.count("WA")
c = s.count("TLE")
d = s.count("RE")
print("AC x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))

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

print("AC x " + str(int(list.count('AC'))))
print("WA x " + str(int(list.count('WA'))))
print("TLE x " + str(int(list.count('TLE'))))
print("RE x " + str(int(list.count('RE'))))

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

print("AC x",A.count("AC"),"\nWA x",A.count("WA"), "\nTLE x",A.count("TLE"), "\nRE x",A.count("RE"))

Solution (Python):
from collections import Counter 

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

c = Counter(s)

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

Solution (Python):
def resolve():
	N = int(input())
	lst = [input() for _ in range(N)]
	print(f'AC x {lst.count("AC")}')
	print(f'WA x {lst.count("WA")}')
	print(f'TLE x {lst.count("TLE")}')
	print(f'RE x {lst.count("RE")}')
resolve()

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

ac = wa = tle = 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):
n = int(input())
results = [input() for i in range(n)]

ac = sum(x == "AC" for x in results) 
wa = sum(x == "WA" for x in results) 
tle = sum(x == "TLE" for x in results) 
re = sum(x == "RE" for x in results) 

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

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

Solution (Python):
from collections import Counter

N = int(input())
S = [input() for _ in range(N)]
c = Counter(S)
print("\n".join("{} x {:d}".format(k, c[k]) for k in ["AC", "WA", "TLE", "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
    else:
        re += 1
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(ac,wa,tle,re))

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

nAC = S.count('AC')
nWA = S.count('WA')
nTLE = S.count('TLE')
nRE = S.count('RE')

print('AC x', int(nAC))
print('WA x', int(nWA))
print('TLE x', int(nTLE))
print('RE x', int(nRE))

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

p = str(d["AC"])
q = str(d["WA"])
r = str(d["TLE"])
s = str(d["RE"])

print("AC x " + p)
print("WA x " + q)
print("TLE x " + r)
print("RE x " + s)

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

    ac=0
    wa=0
    tle=0
    re=0
    for i in range(N):
        j=input("")
        if j=="AC":
            ac+=1
        elif j=="WA":
            wa+=1
        elif j=="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))

if __name__=="__main__":
    main()

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

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

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

for i in range(N):
  judge=input()
  
  if judge == "AC":
    AC = AC + 1
  if judge == "WA":
    WA = WA + 1
  if judge == "TLE":
    TLE = TLE + 1
  if judge == "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())
eval_list = []
for i in range(N):
  eval_list.append(input())
print('AC x ' + str(eval_list.count('AC')))
print('WA x ' + str(eval_list.count('WA')))
print('TLE x ' + str(eval_list.count('TLE')))
print('RE x ' + str(eval_list.count('RE')))

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

Solution (Python):
import collections
n = int(input())
s = [input() for _ in range(n)]
c = collections.Counter(s)

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())
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):
from collections import defaultdict
n=int(input())
ans=defaultdict(int)
for _ in range(n):
  s=str(input())
  c=ans.get(s)
  if c:
  	ans.update({s:c+1})
  else:
    ans.update({s:1})
print("AC x ",ans["AC"])
print("WA x ",ans["WA"])
print("TLE x ",ans["TLE"])
print("RE x ",ans["RE"])

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", ac, "\n"
      "WA", "x", wa, "\n"
      "TLE", "x", tle, "\n"
      "RE", "x", re)

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

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

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

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

Solution (Python):
n=int(input())
s=[]
for i in range(n):
    s.append(input())
a=[0]*4
for i in range(n):
    if s[i]=='AC':
        a[0]+=1
    elif s[i]=='WA':
        a[1]+=1
    elif s[i]=='TLE':
        a[2]+=1
    else:
        a[3]+=1
print("AC x {}".format(a[0]))
print("WA x {}".format(a[1]))
print("TLE x {}".format(a[2]))
print("RE x {}".format(a[3]))

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

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

ca=a.count('AC')
cw=a.count('WA')
ct=a.count('TLE')
cr=a.count('RE')
print('AC x',ca)
print('WA x',cw)
print('TLE x',ct)
print('RE x',cr)

Solution (Python):
def main():
    N = int(input())
    S = []
    for _ in range(N):
        S.append(input())
    answers = solve(N, S)
    print('\n'.join(answers))


def solve(N, S):
    counter = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE':0}
    for judge in S:
        counter[judge] += 1

    return [f'{k} x {v}' for k, v in counter.items()]


if __name__ == "__main__":
    main()

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

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

for i in range(N):
    for j in range(4):
        if judge[j]==S[i]:
            C[j]=C[j]+1

for k in range(4):
    print(f'{judge[k]} x {C[k]}')

Solution (Python):
N = int(input())
S = []
for _ in range(N):
    S.append(input())
ac=0
wa=0
tle=0
re=0
for i in S:
    if i =='AC':
        ac+=1
    elif i=='TLE':
        tle+=1
    elif i=='WA':
        wa+=1
    elif 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):
n = int(input())
ac = 0
wa = 0
tel = 0
re = 0
for y in range(0,n):
  x = input()
  if x[0] == 'A':
    ac += 1
  elif x[0] == 'W':
    wa += 1
  elif x[0] == 'T':
    tel += 1
  else:
    re += 1
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tel))
print("RE x " + str(re))

Solution (Python):
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for x in range(N):
    ia = input()
    if ia == "AC":
        ac += 1
    elif ia == "WA":
        wa += 1
    elif ia == "TLE":
        tle += 1
    elif ia == "RE":
        re += 1
    else:
        break

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

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

for i in range(n):
    l.append(input())

    
print('AC x ' + str(l.count('AC')))
print('WA x ' + str(l.count('WA')))
print('TLE x ' + str(l.count('TLE')))
print('RE x ' + str(l.count('RE')))

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

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

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

print('AC x', c0)
print('WA x', c1)
print('TLE x', c2)
print('RE x', c3)

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
for k, v in d.items():
    print(f"{k} x {v}")

Solution (Python):
n = int(input())
s = []
for i in range(n):
    s.append(input())
ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
    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 {}'.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 _ in range(n):
    s=input()
    d[s] += 1
print("AC x %d" % d["AC"])
print("WA x %d" % d["WA"])
print("TLE x %d" % d["TLE"])
print("RE x %d" % d["RE"])

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

Solution (Python):

times = int(input())  
n = [input() for i in range(times)]
acount=0
wacount=0
tlecount=0
recount=0
for item in n:
    if item == 'AC':
        acount += 1
    elif item == 'WA':
        wacount += 1
    elif item == 'TLE':
        tlecount += 1
    elif item == 'RE':
        recount += 1

print('AC x '+ str(acount))
print('WA x '+str(wacount))
print('TLE x '+str(tlecount))
print('RE x '+str(recount))

Solution (Python):
S=input()
S=int(S)
a = [input() for i in range(S)]
AC=0
WA=0
TLE=0
RE=0

for a in a:
    if a=="AC":
        AC+=1
    if a=="WA":
        WA+=1
    if a=="TLE":
        TLE+=1
    if a=="RE":
        RE+=1
print("AC x "+str(AC) )
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

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):
import collections

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

c = collections.Counter(s)

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

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

print("AC", "x", output_list.count("AC"), "\n",
     "WA", "x", output_list.count("WA"), "\n",
     "TLE", "x", output_list.count("TLE"), "\n",
     "RE", "x", output_list.count("RE"), "\n",)

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

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

Solution (Python):
i,l,L=input,[],["AC","WA","TLE","RE"]
n = int(i())
for x in range(0,n):
	l.append(i())
for x in L:
	print(f"{x} x {l.count(x)}")

Solution (Python):
n=int(input())
ac_list=[input() for i in range(n)]
AC = ac_list.count('AC')
WA = ac_list.count('WA')
TLE = ac_list.count('TLE')
RE = ac_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):
number_of_traials = int(input())

AC_counter = 0
WA_counter = 0
TLE_counter = 0
RE_counter = 0

for i in range(number_of_traials):
    result = input()
    if result == "AC":
        AC_counter += 1
    elif result == "WA":
        WA_counter += 1
    elif result == "TLE":
        TLE_counter += 1
    elif result == "RE":
        RE_counter += 1

print("AC x {}".format(AC_counter))
print("WA x {}".format(WA_counter))
print("TLE x {}".format(TLE_counter))
print("RE x {}".format(RE_counter))

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

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

for i in range(num_of_test):
  temp_input = input()
  acums[temp_input] += 1

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

Solution (Python):
ac_cnt = 0
wa_cnt = 0
tle_cnt = 0
re_cnt = 0

for _ in range(int(input())):
	res = input()
	if res == 'AC':
		ac_cnt += 1
	elif res == 'WA':
		wa_cnt += 1
	elif res == 'TLE':
		tle_cnt += 1
	else:
		re_cnt += 1

print("AC x {}".format(ac_cnt))
print("WA x {}".format(wa_cnt))
print("TLE x {}".format(tle_cnt))
print("RE x {}".format(re_cnt))

Solution (Python):
import sys

n = int(input())

list_input = [sys.stdin.readline()[:-1] for _ in range(n)]

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

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

a = str_list.count("AC")
w = str_list.count("WA")
t = str_list.count("TLE")
r = str_list.count("RE")

print("AC x",a)
print("WA x",w)
print("TLE x",t)
print("RE x",r)

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

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

Solution (Python):
li = [0] * 4
N = int(input())
for i in range(N):
    result = input()
    if result == "AC":
        li[0] += 1
    if result == "WA":
        li[1] += 1 
    if result == "TLE":
        li[2] += 1
    if result == "RE":
        li[3] += 1
line = "AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}".format(li[0], li[1], li[2], li[3])
print(line)

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

AC = []
WA = []
TLE = []
RE = []

for i in range(N):
    if S[i] == "AC":
        AC.append(i)
    elif S[i] == "WA":
        WA.append(i)
    elif S[i] == "TLE":
        TLE.append(i)
    else:
        RE.append(i)
print("AC",  "x",  len(AC))
print("WA",  "x",  len(WA))
print("TLE",  "x",  len(TLE))
print("RE",  "x",  len(RE))

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

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

for si in S:
    if si == "AC":
        ac += 1
    elif si == "WA":
        wa += 1
    elif si == "TLE":
        tle += 1
    else:
        re += 1

ans = "AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}".format(ac, wa, tle, re)

print(ans)

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

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


c=Counter(a)

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

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

result = ['AC', 'WA', 'TLE', 'RE']
C = [S.count(r) for r in result]

for (re, c) in zip(result, C):
    print(re + ' x ' + str(c))

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

AC=S.count("AC")
WA=S.count("WA")
TLE=S.count("TLE")
RE=S.count("RE")

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

Solution (Python):
N=int(input())
d=dict()
for tt in range(N):
    s=input()
    if s not in d:
        d[s]=1
    else:
        d[s]+=1
for st in ["AC","WA","TLE","RE"]:
    if st not in d:
        print(st," x ",0)
    else:
        print(st," x ",d[st])

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


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


ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
    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' , ac)
print('WA x' ,wa)
print('TLE x' ,tle)
print('RE x' , re)

Solution (Python):
n = int(input())
m = [input() for l in range(n)]
x = []
a = 0
b = 0
c = 0
d = 0
for i in range (0,n):
    if m[i] == "AC":
        a = a + 1
    if m[i] == "WA":
        b = b + 1
    if m[i] == "TLE":
        c = c + 1
    if m[i] == "RE":
        d = d + 1
t = [0,0,0,0]
t[0] = "AC x " +str(a)
t[1] = "WA x " +str(b)
t[2] = "TLE x " +str(c)
t[3] = "RE x " +str(d)
for i in t:
    print(i)

Solution (Python):
countac=0
countwa=0
counttle=0
countre=0
for _ in range(0, int(input())):
    n = input()
    if n=="AC":
        countac += 1
    elif n=="WA":
        countwa += 1
    elif n=="TLE":
        counttle += 1
    elif n=="RE":
        countre += 1
print("AC x ", countac)
print("WA x ", countwa)
print("TLE x ", counttle)
print("RE x ", countre)

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

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

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

print('AC x %d' % S.count('AC'))
print('WA x %d' % S.count('WA'))
print('TLE x %d' % S.count('TLE'))
print('RE x %d' % S.count('RE'))

Solution (Python):
import math

n = int(input())
s = [str(input()) for i in range(n)]
ac_cnt = 0
wa_cnt = 0
tle_cnt = 0
re_cnt = 0
for i in range(n) :
    if(s[i] == 'AC') :
        ac_cnt = ac_cnt + 1
    if(s[i] == 'WA') : 
        wa_cnt = wa_cnt + 1 
    if(s[i] == 'TLE') :  
        tle_cnt = tle_cnt+1
    if(s[i] == 'RE') :
        re_cnt = re_cnt+1
print('AC x', ac_cnt)
print('WA x' ,wa_cnt)
print('TLE x' ,tle_cnt)
print('RE x' ,re_cnt)

Solution (Python):
n = int(input())
r_list = [input() for i in range(n)]
a_list = [0,0,0,0]

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

for r in r_list:
  if r == sult[0]:
    a_list[0] += 1
  elif r == sult[1]:
    a_list[1] += 1
  elif r == sult[2]:
    a_list[2] += 1
  elif r == sult[3]:
    a_list[3] += 1

for i,o in enumerate(sult):
  print(o + " x " + str(a_list[i]))

Solution (Python):
n=int(input())
na,cnt=['AC','WA','TLE','RE'],[0,0,0,0]
while n:
  s=input()
  cnt[na.index(s)]+=1
  n-=1
for i in range(4):
  print(na[i],"x",cnt[i],sep=" ",end='\n')