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

dd=defaultdict(lambda:0)
n=int(input())
a=list(sys.stdin.read().split())
for aa in a:
  dd[aa]+=1
ANSL=["AC", "WA", "TLE", "RE"]

ans=""
for w in ANSL:
  ans+=f"{w} x {dd[w]}\n"
print(ans)

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

for i in range(N):
  C[input()] += 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())
AC=0
WA=0
TLE=0
RE=0
for i in range(n):
    s=input()
    if s=="AC":
        AC+=1
    elif s=="WA":
        WA+=1
    elif s=="TLE":
        TLE+=1
    elif s=="RE":
        RE+=1
print("AC x "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

Solution (Python):
N = int(input())
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())
C = [0, 0, 0, 0]
for i in range(N):
    S = input()
    if S == 'AC':
        C[0] += 1
    elif S == 'WA':
        C[1] += 1
    elif S == 'TLE':
        C[2] += 1
    elif S == 'RE':
        C[3] += 1

s = "AC x " + str(C[0]) + "\nWA x " + str(C[1]) + "\nTLE x " + str(C[2]) + "\nRE x " + str(C[3])
print(s)

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

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

ac=s.count('AC')
wa=s.count('WA')
tle=s.count('TLE')
re=s.count('RE')

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

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

AC_num = 0
WA_num = 0
TLE_num = 0
RE_num = 0

for c in C:
    if(c == "AC"):
        AC_num += 1
    elif(c == "WA"):
        WA_num += 1
    elif(c == "TLE"):
        TLE_num += 1
    elif(c == "RE"):
        RE_num += 1

print("AC x {}".format(AC_num))
print("WA x {}".format(WA_num))
print("TLE x {}".format(TLE_num))
print("RE x {}".format(RE_num))

Solution (Python):
n = int(input())
word_list = ['AC','WA','TLE','RE']
counter = [0,0,0,0]
for i in range(n):
    word = input()
    if word == 'AC':
        counter[0] += 1
    elif word == 'WA':
        counter[1] += 1
    elif word == 'TLE':
        counter[2] += 1
    elif word == 'RE':
        counter[3] += 1
    else:
        pass
for i in range(4):
    print(word_list[i] + ' x',counter[i])

Solution (Python):
N = int(input())
S = {}
for i in range(N):
    A = input()
    if A not in S:
        S[A] = 1
    else:
        S[A] += 1
Al = ['AC','WA','TLE','RE']
for i in range(4):
    if Al[i] in S:
        print(Al[i] +' x ' + str(S[Al[i]]))
    else:
        print(Al[i] +' x 0')

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

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

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

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

for cnd in cnds:
    print(cnd, 'x', nums[cnd])

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

Solution (Python):
from sys import stdin

n = int(stdin.readline().rstrip())

list = []
i = 0
for i in range(n):
  list.append(stdin.readline().rstrip())

AC = WA = TLE = RE = 0
for k in list:
  if k == 'AC':
    AC = AC + 1
  if k == 'WA':
    WA = WA + 1
  if k == 'TLE':
    TLE = TLE + 1
  if k == 'RE':
    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):
import sys
next(sys.stdin)
ct=dict(zip('AC WA TLE RE'.split(),[0]*4))
for ln in sys.stdin:
    ct[ln[:-1]]+=1
for k,v in ct.items():
    print(k,'x',v)

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

num_ac = 0
num_wa = 0
num_tle = 0
num_re = 0

for _ in range(N):
    s = input()
    if s == "AC":
        num_ac += 1
    elif s == "WA":
        num_wa += 1
    elif s == "TLE":
        num_tle += 1
    elif s == "RE":
        num_re += 1


print(f"AC x {num_ac}")
print(f"WA x {num_wa}")
print(f"TLE x {num_tle}")
print(f"RE x {num_re}")

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

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

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

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

    RESULT = 'AC', 'WA', 'TLE', 'RE'

    N = int(input())

    ctr = [0] * 4
    for _ in range(N):
        s = input().rstrip()
        ind = RESULT.index(s)
        ctr[ind] += 1

    for key, cnt in zip(RESULT, ctr):
        print(f'{key} x {cnt}')


if __name__ == '__main__':
    main()

Solution (Python):
import sys

next(sys.stdin)

ct=dict(zip('AC WA TLE RE'.split(),[0]*4))
for s in map(str.strip,sys.stdin):
    ct[s]+=1

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

Solution (Python):


N = int(input())

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

AC = int(0)
TLE = int(0)
WA = int(0)
RE = int(0)

for i in range(N):
    if list[i] == "AC":
        AC = AC + 1
    elif list[i] == "TLE":
        TLE = TLE + 1
    elif list[i] == "WA":
        WA = WA + 1
    else:
        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 = 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
    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())
AC = 0
WA = 0
TLE = 0
RE = 0
for p in range(N):
    i = input()
    if i == 'AC':
        AC += 1
    elif i == 'WA':
        WA += 1
    elif 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())
ac=0
wa=0
tle=0
re=0
for i in range(N):
    check = input()
    if check == "AC":
        ac+=1
    elif check == "WA":
        wa+=1
    elif check == "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):
ac=0
wa=0
tle=0
re=0
for _ in range(int(input())):
    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())
list = []
for i in range(N):
  list.append(input())

a = 0
w = 0
t = 0
r = 0
for i in range(N):
  if list[i] == "AC":
    a = a + 1
  elif list[i] == "WA":
    w = w + 1
  elif list[i] == "TLE":
    t = t + 1
  elif list[i] == "RE":
    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):
    data = input()
    if data == "AC":
        ac += 1
    elif data == "WA":
        wa += 1
    elif data == "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())
STATUS_LIST = []
count_ac = 0
count_wa = 0
count_tle = 0
count_re = 0

for i in range(N):
    status = input()
    if status == "AC":
        count_ac += 1
    if status == "WA":
        count_wa += 1
    if status == "TLE":
        count_tle += 1
    if status == "RE":
        count_re += 1

print("AC x {}".format(count_ac))
print("WA x {}".format(count_wa))
print("TLE x {}".format(count_tle))
print("RE x {}".format(count_re))

Solution (Python):
N = int(input())
Ss = []
for i in range(N):
	Ss.append(input())
	
C0, C1, C2, C3 = 0, 0, 0, 0
for S in Ss:
	if S == 'AC':
		C0 += 1
	elif S == 'WA':
		C1 += 1
	elif S == 'TLE':
		C2 += 1
	else:
		C3 += 1
print("AC x {}".format(C0))
print("WA x {}".format(C1))
print("TLE x {}".format(C2))
print("RE x {}".format(C3))

Solution (Python):
n=int(input())
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
  else:
    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())
count = dict(zip(['AC', 'WA', 'TLE', 'RE'], [0]*4))
for i in range(N):
  count[input()] += 1
for key in count:
  print('{} x {}'.format(key, count[key]))

Solution (Python):
N = int(input())
Ss = []
for i in range(N):
  Ss.append(input())
 
C0, C1, C2, C3 = 0, 0, 0, 0
for S in Ss:
  if S == 'AC':
    C0 += 1
  elif S == 'WA':
    C1 += 1
  elif S == 'TLE':
    C2 += 1
  else:
    C3 += 1
print("AC x {}".format(C0))
print("WA x {}".format(C1))
print("TLE x {}".format(C2))
print("RE x {}".format(C3))

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

for j in ["AC", "WA", "TLE", "RE"]:
  print("{} x {}".format(j, Ss.count(j)))

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):
list=[]
count=int(input())
for i in range(count):
    list.append(input())
print("AC"+" "+"x"+" "+str(list.count("AC")))
print("WA"+" "+"x"+" "+str(list.count("WA")))
print("TLE"+" "+"x"+" "+str(list.count("TLE")))
print("RE"+" "+"x"+" "+str(list.count("RE")))

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

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

C0 = Si.count('AC')
C1 = Si.count('WA')
C2 = Si.count('TLE')
C3 = Si.count('RE')

print('AC x', int(C0))
print('WA x', int(C1))
print('TLE x', int(C2))
print('RE x', int(C3))

Solution (Python):
n=int(input())
s=[]
for i in range(n):
    s.append( input() )
t=["AC","WA","TLE","RE"]
c=[0,0,0,0]

for i in range(n):
    for j in range(4):
        if s[i]==t[j]:
            c[j]+=1

for j in range(4):
    print(t[j], "x",c[j])

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

ac_count = 0
wa_count = 0
tle_count = 0
re_count = 0

for i in range(loop_count):
    result = input()
    if result == 'AC':
        ac_count += 1
    elif result == 'WA':
        wa_count += 1
    elif result == 'TLE':
        tle_count += 1
    else:
        re_count += 1

print("AC x {0}".format(str(ac_count)))
print("WA x {0}".format(str(wa_count)))
print("TLE x {0}".format(str(tle_count)))
print("RE x {0}".format(str(re_count)))

Solution (Python):
AC = 0
WA = 0
TLE = 0
RE = 0

N = int(input())
for i in range(N):
  a = input()
  if(a == 'AC'):
    AC+=1
  elif(a == 'WA'):
    WA+=1
  elif(a == '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 = [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())
dict = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(N):
    S = input()
    dict[S] += 1
for key, value in dict.items():
    print('{} x {}'.format(key, value))

Solution (Python):
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  num=str(input())
  if num=="AC":
    ac+=1
  elif num=="WA":
    wa+=1
  elif num=="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):
a = 0
w = 0
r = 0
t = 0
for _ in range(int(input())):
	s = input()
	if s=="AC":
		a+=1
	elif s=="WA":
		w+=1
	elif s=="TLE":
		t+=1
	else:
		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,*d = map(str, open(0).read().split())
AC,WA,TLE,RE=0,0,0,0

for i in range(int(n)):
    if d[i]=="AC":
        AC+=1
    if d[i]=="WA":
        WA+=1
    if d[i]=="TLE":
        TLE+=1
    if d[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):
N = int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
  a = input()
  if a == 'AC':
    AC += 1
  elif a == 'WA':
    WA += 1
  elif a == 'TLE':
    TLE += 1
  else:
    RE += 1
    
print('AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}'.format(AC,WA,TLE,RE))

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

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

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

d=dict(AC=0, WA=0, TLE=0, RE=0)

for s in listA:
  d[s]+=1
for k,v in d.items():
  print(k,'x',v)

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

for k in ["AC", "WA", "TLE", 'RE']:
    print(f"{k} x {m[k]}")

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

for k 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())
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())

in_str = ''

for n in range(N):
    in_str = in_str + input()

ans_ac = str(in_str.count('AC'))
ans_wa = str(in_str.count('WA'))
ans_tle = str(in_str.count('TLE'))
ans_re = str(in_str.count('RE'))

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

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

Solution (Python):

if __name__ == '__main__':
    n = int(input())
    ac = 0
    wa = 0
    tle = 0
    re = 0

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

Solution (Python):
n = int(input())
s = []
ac = 0
wa = 0
tle = 0
re = 0
for i 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 ", end='')
print(ac)

print("WA x ", end='')
print(wa)

print("TLE x ", end='')
print(tle)

print("RE x ", end='')
print(re)

Solution (Python):
import math, sys
from collections import Counter
inputs = iter(sys.stdin.readlines())
n = int(next(inputs))
cnt = Counter([next(inputs).rstrip() for _ in range(n)])
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):
N=int(input())
S=[]
for i in range(N):
    S.append(input())
AC=WA=TLE=RE=0
for i in S:
    if i=="AC":
        AC+=1
    if i=="WA":
        WA+=1
    if i=="TLE":
        TLE+=1
    if i=="RE":
        RE+=1
print("""AC x {}
WA x {}
TLE x {}
RE x {}""".format(AC,WA,TLE,RE))

Solution (Python):
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(n):
    a = input()
    if a == "AC":
        c0 += 1
    elif a == "WA":
        c1 += 1
    elif a == "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())
result = [0] * 4
for _ in range(N):
    S = input()
    if S == 'AC':
        result[0] += 1
    elif S == 'WA':
        result[1] += 1
    elif S == 'TLE':
        result[2] += 1
    elif S == 'RE':
        result[3] += 1
        
print('AC x {}'.format(result[0]))
print('WA x {}'.format(result[1]))
print('TLE x {}'.format(result[2]))
print('RE x {}'.format(result[3]))

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

Solution (Python):
n = int(input())
c1=0
c2=0
c3=0
c4=0
for I in range(1, n+1):
    s = str(input())
    if(s == "AC"):
        c1+= 1
    elif(s == "WA"):
        c2+=1
    elif(s == "TLE"):
        c3+=1
    elif(s == "RE"):
        c4 +=1
print(f"AC x {c1}")
print(f"WA x {c2}")
print(f"TLE x {c3}")
print(f"RE x {c4}")

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


import math
import sys
import itertools
from math import gcd
from math import sqrt
from sys import stdin
def input() : return stdin.readline().rstrip()
def mips():
    return map(int,input().split())
def ii():
    return int(input())
sys.setrecursionlimit(10**9)

N = int(input())
d = dict()
d["AC"] = 0
d["WA"] = 0
d["TLE"] = 0
d["RE"] = 0
for _ in range(N):
    s = input()
    d[s] += 1
for key,val in d.items():
    print(key + ' x ' + str(val))

Solution (Python):
n = int(input())
res = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
    s = input()
    res[s] += 1
for k, v in res.items():
    print(f'{k} x {v}')

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

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

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
  elif s == 'RE':
    c3 += 1

print('AC x {}'.format(c0))
print('WA x {}'.format(c1))
print('TLE x {}'.format(c2))
print('RE x {}'.format(c3))

Solution (Python):
N = int(input())
S = []
for i in range(N):
    S.append(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i in range(N):
    if S[i] == "AC":
        c0 = c0 + 1
    elif S[i] == "WA":
        c1 = c1 + 1
    elif S[i] == "TLE":
        c2 = c2 + 1
    else:
        c3 = c3 + 1

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

Solution (Python):
import sys
import numpy as np
from math import ceil
from collections import defaultdict as D

def S(): return sys.stdin.readline().rstrip().split(' ')
def Ss(): return list(S())
def I(): return _I(Ss())
def Is(): return list(I())
def _I(ss): return map(int, ss) if len(ss) > 1 else int(ss[0])

d = D(int)
n = I()
for _ in range(n):
  s = S()[0]
  d[s] += 1

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

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

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

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

Solution (Python):
from collections import Counter


def solve(string):
    n, *s = string.split()
    c = Counter(s)
    return "\n".join(f"{k} x {c[k]}" for k in "AC WA TLE RE".split())


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

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

a = [0]*N
for i in range(N):
    a[i]=input()

result=[0]*4
for i in range(len(a)):
    if a[i] == "AC":
        result[0]+=1

    if a[i] == "WA":
        result[1]+=1

    if a[i] == "TLE":
        result[2]+=1

    if a[i] == "RE":
        result[3]+=1

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

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

for i in range(0,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())

ans = [0, 0, 0, 0]

for i in range(n):
  s = input()
  if s == 'AC':
    ans[0] += 1
  elif s == 'WA':
    ans[1] += 1
  elif s == 'TLE':
    ans[2] += 1
  else:
    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):
import collections

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

order = ["AC", "WA", "TLE", "RE"]
for ans in order:
    print(ans + " x " + str(c[ans]))

Solution (Python):
n=int(input())
a=[0,0,0,0]
l=["AC", "WA", "TLE", "RE"]
for _ in range(n):
    s=input()
    a[l.index(s)]+=1
for i in range(4):
    print(l[i]+" x "+str(a[i]))

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

enj = ['AC', 'WA', 'TLE', 'RE']
cnt = {res: 0 for res in enj}
for res in s:
    cnt[res] += 1
for res in enj:
    print('{} x {}'.format(res, cnt[res]))

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

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

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

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

Solution (Python):
from collections import Counter
c = Counter([input().strip() for i in range(int(input()))])
s = ["AC", "WA", "TLE", "RE"]
for i in s:
  print(i + " x " + str(c[i]))

Solution (Python):



n = int(input())
temp_array = []
addlist = temp_array.append
for i in range(n):
    addlist(input())
print('AC x '+str(temp_array.count('AC')))
print('WA x '+str(temp_array.count('WA')))
print('TLE x '+str(temp_array.count('TLE')))
print('RE x '+str(temp_array.count('RE')))

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())
array = [input() for _ in range(N)]
print('AC x ' + str(array.count('AC')))
print('WA x ' + str(array.count('WA')))
print('TLE x ' + str(array.count('TLE')))
print('RE x ' + str(array.count('RE')))

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

Solution (Python):

def b():
    n = int(input())
    AC=0
    WA=0
    TLE=0
    RE=0
    while n:
        n-=1
        t= input()
        if t=='AC':
            AC+=1
        elif t=='WA':
            WA+=1
        elif t=='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)
b()

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

ac = wa = tle = re = 0
for judge in judges:
  if (judge == "AC"):
    ac += 1
  elif (judge == "WA"):
    wa += 1
  elif (judge == "TLE"):
    tle += 1
  elif (judge == "RE"):
    re += 1

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

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

result = []

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

count = [0,0,0,0]

for s in result:
    if s == "AC":
        count[0] += 1
    if s == "WA":
        count[1] += 1
    if s == "TLE":
        count[2] += 1
    if s == "RE":
        count[3] += 1

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

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

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

Solution (Python):
n=int(input())
s=[]
for i in range(n):
    ss = input()
    s.append(ss)
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())
s = [input() for i in range(N)]

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

for k in s:
    res[k] = res[k] + 1

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

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

ACcount = 0 
WAcount = 0
TLEcount = 0
REcount = 0
for i in range(N):
	S=input()

	if S == "AC":
		ACcount = ACcount + 1
	elif S == "WA":
		WAcount = WAcount + 1
	elif S == "TLE":
		TLEcount = TLEcount + 1
	elif S == "RE":
		REcount = REcount + 1

print("AC x", ACcount)
print("WA x", WAcount)
print("TLE x", TLEcount)
print("RE x", REcount)

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

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

for n in range(N):
    if S[n] == "AC":
        C[0] += 1
    elif S[n] == "WA":
        C[1] += 1
    elif S[n] == "TLE":
        C[2] += 1
    else:
        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):

d=dict()
d["AC"]=0
d["WA"]=0
d["TLE"]=0
d["RE"]=0
t=int(input())
while t:
	t-=1
	s=input()
	d[s]+=1

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

Solution (Python):
N = int(input())
result_list = []
for i in range(N):
	result_list.append(input())
count_ac = result_list.count("AC")
count_wa = result_list.count("WA")
count_tle = result_list.count("TLE")
count_re = result_list.count("RE")

print("AC x {}".format(count_ac))
print("WA x {}".format(count_wa))
print("TLE x {}".format(count_tle))
print("RE x {}".format(count_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):
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:
        None

print('AC', ac, sep=' x ')
print('WA',wa,sep=' x ')
print('TLE',tle,sep=' x ')
print('RE',re,sep=' x ')

Solution (Python):
num=int(input().rstrip())
cases=[]
for i in range(num):
    cases.append(input().rstrip())
target=['AC','WA','TLE','RE']
result=[0,0,0,0]
for j in range(len(target)):
    for i in range(len(cases)):
        if cases[i]==target[j]:
            result[j]=result[j]+1
for i in range(len(target)):
    print(target[i]+' x '+str(result[i]))

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

Solution (Python):
from collections import Counter
N=int(input())
ll=[]
for i in range(N):
    ll.append(input())
c=Counter(ll)
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())
d={'AC':0,'RE':0,'WA':0,'TLE':0}
for i in range(n):
    s=input().strip()
    d[s]=d[s]+1
print('AC x '+str(d['AC']))
print('WA x '+str(d['WA']))
print('TLE x '+str(d['TLE']))
print('RE x '+str(d['RE']))