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 = [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())
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', AC)
print('WA x', WA)
print('TLE x', TLE)
print('RE x', RE)

Solution (Python):
N = int(input())
AC, WA, TLE, RE = 0, 0, 0, 0
for i in range(N):
  temp = input()
  if temp == 'AC':
    AC += 1
  elif temp == 'WA':
    WA += 1
  elif temp == '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())
judge = [0]*n
for _ in range(n):
  judge[_] = input()


ac, wa, tle, re = 0, 0, 0, 0
for c in judge:
  if c=='AC':
    ac += 1
  elif c=='WA':
    wa += 1
  elif c=='TLE':
    tle += 1
re = n - (ac+wa+tle)

judges = [ac, wa, tle, re]
judge_c = ["AC","WA","TLE","RE"]
for i in range(len(judge_c)):
  print(f'{judge_c[i]} x {judges[i]}')

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):
num = int(input())
lst = [input() for _ in range(num)]
print("AC x", lst.count("AC"))
print("WA x", lst.count("WA"))
print("TLE x", lst.count("TLE"))
print("RE x", lst.count("RE"))

Solution (Python):


N = int(input())
lst = "AC,WA,TLE,RE".split(',')
mp = {s : 0 for s in lst}
for i in range(N):
    S = input().strip()
    mp[S] += 1
for s in lst:
    print(f'{s} x {mp[s]}')

Solution (Python):
AC=0
WA=0
TLE=0
RE=0
n=int(input())
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):
x=int(input())
b=0;
lst=[]
acs=0
was=0
res=0
tles=0
while(b<x):
    new=input()
    lst.append(new)
    b+=1
for c in lst:
    if(c=='AC'):
        acs+=1
    if(c=='WA'):
        was+=1
    if(c=='RE'):
        res+=1
    if(c=='TLE'):
        tles+=1
print('AC x '+str(acs))
print('WA x '+ str(was))
print('TLE x ' +str(tles))
print('RE x ' +str(res))

Solution (Python):
num = int(input())
lst = [input() for _ in range(num)]
print("AC x", lst.count("AC"))
print("WA x", lst.count("WA"))
print("TLE x", lst.count("TLE"))
print("RE x", lst.count("RE"))

Solution (Python):
import datetime
import string
import re
import math

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

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

for page in aDic:
    print(page + ' x ' + str(aDic[page]))

Solution (Python):
n = int(input())
ans_list = [['AC',0],['WA',0],['TLE',0],['RE',0]]
for i in range(0,n):
    s = str(input())
    for j in range(0,4):
        if ans_list[j][0] == s:
            ans_list[j][1] += 1

for j in range(0,4):
    print(ans_list[j][0],'x',ans_list[j][1])

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

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

    if s == 'AC':
        ac = ac+1
    elif s == 'TLE':
        tle = tle+1
    elif s == 'WA':
        wa = wa+1
    elif 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):
def B():
    n, *s = open(0).read().split()
    import collections
    c = collections.Counter(s)
    ret_l = ["AC","WA","TLE","RE"]
    for t in ret_l:
        print(t +  " x " + str(c[t]))
B()

Solution (Python):
def B():
    n = int(input())
    s = []
    for _ in range(n):
        s.append(input())
    import collections
    c = collections.Counter(s)
    ret_l = ["AC","WA","TLE","RE"]
    for t in ret_l:
        print(t +  " x " + str(c[t]))
B()

Solution (Python):

def inputlist(): return [int(j) for j in input().split()]

N = int(input())
li = [0]*N
for i in range(N):
    li[i] = input()
from collections import Counter
dic = Counter(li)
keys = ["AC","WA","TLE","RE"]
for key in keys:
    print(key,"x",str(dic[key]))

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

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

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

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

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

Solution (Python):
re=0
tle=0
wa=0
ac=0
ip=[]
n=int(input())
for i in range(n):
  ip.append(input())
for i in range(n):
  if ip[i]=="AC":
    ac=ac+1
  if ip[i]=="TLE":
    tle=tle+1
  if ip[i]=="WA":
    wa=wa+1
  if ip[i]=="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):
re=0
tle=0
wa=0
ac=0
ip=[]
n=int(input())
for i in range(n):
  ip.append(input())
for i in range(n):
  if ip[i]=="AC":
    ac=ac+1
  if ip[i]=="TLE":
    tle=tle+1
  if ip[i]=="WA":
    wa=wa+1
  if ip[i]=="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):
from collections import defaultdict
case = defaultdict(int)
N = int(input())
for _ in range(N):
  case[input()] += 1
lst = ['AC', 'WA', 'TLE', 'RE']
for i in lst:
  print(i, 'x', case[i])

Solution (Python):
n = int(input())
ac = wa = tle = re = 0
while n > 0:
    j = input()
    if j == 'AC':
        ac += 1
    if j == 'WA':
        wa += 1
    if j == 'TLE':
        tle += 1
    if j == 'RE':
        re += 1
    n -= 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 defaultdict

N = int(input())
mem = defaultdict()
mem["AC"] = 0
mem["WA"] = 0
mem["TLE"] = 0
mem["RE"] = 0
for i in range(N):
    inp = input()
    mem[inp] += 1
print("AC x " + str(mem["AC"]))
print("WA x " + str(mem["WA"]))
print("TLE x " + str(mem["TLE"]))
print("RE x " + str(mem["RE"]))

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

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

for i in range(n):
  r = input()
  di[r] += 1
 
for i in di.keys():
  print("{} x {}".format(i,di[i]))

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

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

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

c = [s.count('AC'),s.count('WA'),s.count('TLE'),s.count('RE')]
d = ['AC','WA','TLE','RE']

for i in range(4):
    print(d[i]+' '+'x'+' '+str(c[i]) )

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

Solution (Python):
from collections import defaultdict

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

kind = ["AC","WA","TLE","RE"]
d = defaultdict(int)
for i in range(N):
    d[S[i]] += 1

for i in range(len(kind)):
    print("{} x {}".format(kind[i],d[kind[i]]))

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

Solution (Python):
from collections import Counter

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

count = Counter(s)

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())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(0, N):
  val = input()
  if val == "AC":
      c0 += 1
  elif val == "WA":
      c1 += 1
  elif val == "TLE":
      c2 += 1
  else :
      c3 += 1

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

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

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

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

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

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(istr, ostr):
    n = int(istr.readline())
    types = ["AC", "WA", "TLE", "RE"]
    counts = dict((t, 0) for t in types)
    for i in range(n):
        t = istr.readline().strip()
        counts[t] += 1
    for k, v in counts.items():
        print(f"{k} x {v}", file=ostr)


if __name__ == "__main__":
    import sys

    main(sys.stdin, sys.stdout)

Solution (Python):
n=int(input())
list=[input() for i in range(n)]
ans_AC=len([1 for x in list if x=="AC"])
ans_WA=len([1 for x in list if x=="WA"])
ans_TLE=len([1 for x in list if x=="TLE"])
ans_RE=len([1 for x in list if x=="RE"])
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())
lst_s=list()

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

for i in range(n):
    s=input().upper()
    lst_s.append(s)

for s in lst_s:
    for verdict in verdicts:
        if s == verdict:
            verdicts[s] += 1

for verdict in verdicts:
    print(verdict, "x", verdicts[verdict])

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
mo = 10**9+7

def main():
    N = II()
    ans = [0,0,0,0]
    for i in range(N):
        S = IS()
        if S == 'AC': ans[0]+=1
        elif S == 'WA': ans[1]+=1
        elif S == 'TLE': ans[2]+=1
        elif S == 'RE': ans[3]+=1

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

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
  string = input()
  if string == 'AC':
    ac += 1
  elif string == 'WA':
    wa += 1
  elif string == '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())
result = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(n):
  s = input()
  result[s] += 1
print('AC x',result['AC'])
print('WA x',result['WA'])
print('TLE x',result['TLE'])
print('RE x',result['RE'])

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

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

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

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

for i in range(4):
    countkindl = A.count(kindl[i])
    print(kindl[i] + " x " + str(countkindl))

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()


S = [_S() for _ in range(N)]
c = collections.Counter(S)

result = ['AC', 'WA', 'TLE', 'RE']
for j in result:
    print(j + ' x ' + str(c[j]))

Solution (Python):



def main():
    n = int(input())
    s = [input() for i in range(n)]
    for i in ["AC", "WA", "TLE", "RE"]:
        print(i + " x " + str(s.count(i)))


if __name__ == '__main__':
    main()

Solution (Python):
from collections import Counter

N,S = int(input()),[]
for _ in range(N):
	S.append(input())
c = 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 i in range(n)]
for v in ['AC', 'WA', 'TLE', 'RE']:
    print('{0} x {1}'.format(v, s.count(v)))

Solution (Python):
from collections import defaultdict
N = int(input())
S = [input() for _ in range(N)]
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']))

Solution (Python):



N=int(input())
res=[0]*4
for i in range(N):
    moji=input()
    if moji == 'AC':
        res[0] += 1
    elif moji == 'WA':
        res[1] += 1
    if moji == 'TLE':
        res[2] += 1
    if moji == 'RE':
        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):
import sys

N = int(input())
S = sys.stdin.readlines()
C = [0] * 4

for i in range(N):
  if S[i].rstrip() == 'AC':
    C[0] += 1
    continue
  if S[i].rstrip() == 'WA':
    C[1] += 1
    continue
  if S[i].rstrip() == 'TLE':
    C[2] += 1
    continue
  if S[i].rstrip() == 'RE':
    C[3] += 1
    continue

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

Solution (Python):
N,li,count = int(input()),[],0
for i in range(N):li.append(input())
print(f"AC x {li.count('AC')}\nWA x {li.count('WA')}\nTLE x {li.count('TLE')}\nRE x {li.count('RE')}")

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

c1, c2, c3, c4 = 0, 0, 0, 0
for i in range(t):
	s = input()
	if s == 'AC':
		c1 += 1
	elif s == 'TLE':
		c2 += 1
	elif s == 'WA':
		c3 += 1
	else:
		c4 += 1
print('AC x', c1)
print('WA x', c3)
print('TLE x', c2)
print('RE x', c4)

Solution (Python):
S = []
for i in range(int(input())):
    S.append(input())
C0,C1,C2,C3=0,0,0,0
for s in S:
    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):

def main():
	N = int(input())
	S = [input() for i in range(N)]
	testcase = ['AC','WA','TLE','RE']
	for v in testcase:
		print(v, ' x ', S.count(v))


if __name__ == '__main__':
	main()

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

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

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

for i in judge_list:
    judge_dict[i] = judge_dict[i] + 1

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

Solution (Python):
from collections import Counter

cnt = Counter()
num = int(input())
for ans in [input() for i in range(num)]:
    cnt[ans] += 1

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

Solution (Python):
dic={}

n=int(input())

for i in range(n):
  x=input()
  if x in dic:
    dic[x]=dic[x]+1
  else:
    dic[x]=1

print("AC x {}".format(dic.get("AC",0)))
print("WA x {}".format(dic.get("WA",0)))
print("TLE x {}".format(dic.get("TLE",0)))
print("RE x {}".format(dic.get("RE",0)))

Solution (Python):
N = int(input())
C = [0 for _ in range(4)]
result = ["AC", "WA", "TLE", "RE"]

for _ in range(N):
  S = input()
  for i in range(4):
    if S == result[i]:
      C[i] += 1
      break

for i in range(4):
  print("{} x {}".format(result[i], C[i]))

Solution (Python):
import numpy as np

N = int(input())
var = [str(input()) for i in range(N)]

judges = ['AC', 'WA', 'TLE', 'RE']
for j in judges:
    print('{} x {}'.format(j, (np.array(var) == j).sum()))

Solution (Python):






import math
import statistics
import numpy as np
import queue
import itertools
import functools 

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

for st in status:
  print('{} x {}'.format(st, status[st]))

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

Solution (Python):
N = int(input())
S = [input() for x 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())
S = [input() for i 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):
ac=0
wa=0
tle=0
re=0
for _ in range(int(input())):
  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",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)

Solution (Python):
import sys
N = int(input())
base = ['AC','WA','TLE','RE']
array = [ input() for a in range(N) ]

if not ( 1 <= N <= 10**5 ): sys.exit()
for I in array:
    if I not in base: sys.exit()

for I in base:
    print(I+' x '+str(array.count(I)))

Solution (Python):
import sys
N = int(input())
array = [ input() for a in range(N) ]
base = ['AC','WA','TLE','RE']

for I in base:
    print(I+' x '+str(array.count(I)))

Solution (Python):
import math
def gcd(a,b): 
    if(b==0): 
        return a 
    else: 
        return gcd(b,a%b) 

    
n = int(input())
d = {'AC':0, 'WA': 0, 'TLE': 0, 'RE': 0 }
for i in range(n):
    s = str(input())
    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):
a = ["AC", "WA", "TLE", "RE"]
ans = [0]*4
n = int(input())
l = [input() for _ in range(n)]
for i in l:
    for j in range(4):
        if i == a[j]:
            ans[j] += 1

for k in range(4):
    print(a[k] + " x " + str(ans[k]))

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

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

print('AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}'.format(x.count('AC'), x.count('WA'), x.count('TLE'), x.count('RE')))

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

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

print('AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}'.format(x.count('AC'), x.count('WA'), x.count('TLE'), x.count('RE')))

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

n = int(input())

x = [input().rstrip() for i in range(n)]

print('AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}'.format(x.count('AC'), x.count('WA'), x.count('TLE'), x.count('RE')))

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

Solution (Python):



def main(n, s):
    result_table = {
        'AC': 0,
        'WA': 0,
        'TLE': 0,
        'RE': 0
    }
    for i in s:
        result_table[i] += 1
    return result_table


if __name__ == "__main__":
    n = int(input())
    s = []
    for i in range(n):
        s.append(input())
    results = main(n, s)
    for key, value in results.items():
        print(f"{key} x {value}")

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

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

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

n = int(input())

res = [0,0,0,0]
for _ in range(n):
    tmp = input()
    if tmp == "AC":
        res[0] +=1
    elif tmp == "WA":
        res[1] +=1
    elif tmp == "TLE":
        res[2] +=1
    elif tmp == "RE":
        res[3] +=1

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

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

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

for v in s:
    if(v == "AC"):
        AC+=1
    elif(v == "WA"):
        WA+=1
    elif(v == "TLE"):
        TLE+=1
    else:
        RE+=1
        
print('AC x %d' % (AC))
print('WA x %d' % (WA))
print('TLE x %d' % (TLE))
print('RE x %d' % (RE))

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

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

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

for i in range(N_size):
    str_input = input()
    if str_input == "AC":
        cnt_AC = cnt_AC + 1
    elif str_input == "WA":
        cnt_WA = cnt_WA + 1
    elif str_input == "TLE":
        cnt_TLE = cnt_TLE + 1
    elif str_input == "RE":
        cnt_RE = cnt_RE + 1

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

Solution (Python):
n = int(input())
ac = wa = tle = 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 {}".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)]

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):
rmap = {
  "AC": 0,
  "WA": 0,
  "TLE": 0,
  "RE": 0,
}

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

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

for k in output_order:
  print("{} x {}".format(k, rmap[k]))

Solution (Python):
N=int(input())
li = [input() for i in range(N)]
a=b=c=d=0
for j in range(0,N):
  item=li[j]
  if item=="AC":
    a+=1
  elif item=="WA":
    b+=1
  elif item=="TLE":
    c+=1
  elif item=="RE":
    d+=1
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(a,b,c,d))

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

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

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

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

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):
c = int(input())
values = [input() for i in range(c)]
count = {}
keys = ['AC', 'WA', 'TLE', 'RE']
for key in keys:
        count[key] = 0

for value in values:
        count[value] = count[value] + 1

for key in keys:
        print(key + ' x ' + str(count[key]))

Solution (Python):
n = int(input())
list = []
c1,c2,c3,c4 = 0,0,0,0
for i in range(0,n):
  list.append(input())
for j in range(0,n):
  if list[j] == "AC":
    c1 = c1+1
  if list[j] == "WA":
    c2 = c2+1
  if list[j] == "TLE":
    c3 = c3+1
  if list[j] == "RE":
    c4 = c4+1
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(c1,c2,c3,c4))

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

import collections

c = collections.Counter(l)

for i in ['AC','WA','TLE','RE']:
    print(i+' x '+str(c[i]))

Solution (Python):
n = int(input())
hoge = [0 for i in range(0,n)]
for i in range(0,n):
    hoge[i] = input()
    
AC_n = hoge.count('AC')
WA_n = hoge.count('WA')
TLE_n = hoge.count('TLE')
RE_n = hoge.count('RE')

result = {
	'AC': AC_n,
  	'WA': WA_n,
  	'TLE': TLE_n,
  	'RE': RE_n
}

for k, v in result.items():
  print('{} x {}'.format(k,v))

Solution (Python):

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

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

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

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

for i in range(4):
    print("{} x {}".format(L[i],cnt[i]))

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

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

for s in ans.keys():
    print("{} x {}".format(s, ans[s]))

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
    elif A[i]=="WA":
        wa+=1
    elif A[i]=="TLE":
        tle+=1
    else:
        re+=1
s=[ac,wa,tle,re]
h=["AC","WA","TLE","RE"]
for i in range(4):
    print(h[i]+" x "+str(s[i]))

Solution (Python):
N = int(input())
Nac = 0
Nwa = 0
Ntle = 0
Nre = 0
for i in range(N):
    a = input()
    if a == "AC":
        Nac += 1
    elif a == "WA":
        Nwa += 1
    elif a == "TLE":
        Ntle += 1
    elif a == "RE":
        Nre += 1

print("AC x %d" % Nac)
print("WA x %d" % Nwa)
print("TLE x %d" % Ntle)
print("RE x %d" % Nre)

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+=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):







































































def abc173_b(lines):
    labels = ['AC', 'WA', 'TLE', 'RE']
    ns = [0, 0, 0, 0]
    for line in range(1, len(lines)):
        for i, label in enumerate(labels):
            if label == lines[line]:
                ns[i] += 1
    answers = list()
    for i, label in enumerate(labels):
        answers.append(label + ' x ' + str(ns[i]))
    return answers



def get_input_lines_1stline_as_n_lines():
    lines = list()
    lines.append(input())
    for _ in range(int(lines[0])):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['6', 'AC', 'TLE', 'AC', 'AC', 'WA', 'TLE']
        lines_export = ['AC x 3', 'WA x 1', 'TLE x 2', 'RE x 0']
    elif pattern == 2:
        lines_input = ['10', 'AC', 'AC', 'AC', 'AC', 'AC', 'AC', 'AC', 'AC', 'AC', 'AC']
        lines_export = ['AC x 10', 'WA x 0', 'TLE x 0', 'RE x 0']
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode



def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines_1stline_as_n_lines()
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = abc173_b(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

Solution (Python):
count_ac=0
count_wa=0
count_tle=0
count_re=0
n=int(input())
for i in range(n):
    s=input()
    if s == "AC":
        count_ac += 1
    elif s == "WA":
        count_wa += 1
    elif s == "TLE":
        count_tle += 1
    else:
        count_re += 1
print("AC x "+str(count_ac))
print("WA x "+str(count_wa))
print("TLE x "+str(count_tle))
print("RE x "+str(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', ac)
print('WA x', wa)
print('TLE x', tle)
print('RE x', re)

Solution (Python):

N = int(input())
ac = wa = tle = re = 0
for i in range(N):
    Si = input()
    if Si == "AC":
        ac = ac + 1
    elif Si == "WA":
        wa = wa + 1
    elif Si == "TLE":
        tle = tle + 1
    elif Si == "RE":
        re = re + 1
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(ac, wa, tle, re))

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

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

for i in range(N):
    Si = input().rstrip()
    test_case[Si] += 1


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