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
N = int(input())
cnt = defaultdict(int)
for i in range(N):
    S = input()
    cnt[S] += 1
for k in ["AC", "WA", "TLE", "RE"]:
    print("{} x {}".format(k, cnt[k]))

Solution (Python):
N = int(input())
ans = [0 for i in range(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())
S = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(N):
    s = input()
    S[s] = S[s] + 1

for a in S:
    print(a + " x " + str(S[a]))

Solution (Python):
from collections import defaultdict

d = defaultdict(int)
for i in range(int(input())):
    d[input()] += 1

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

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

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

for i in range(1,N+1):
  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):
num = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(1, num + 1):
    judge = str(input())
    if judge == "AC":
        ac += 1
    elif judge == "WA":
        wa += 1
    elif judge == "TLE":
        tle += 1
    elif judge == "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())
C = [0]*4
for i in range(N):
    S = input()
    if S == 'AC':
        C[0] += 1
    elif S == 'WA':
        C[1] += 1
    elif S == 'TLE':
        C[2] += 1
    elif S == 'RE':
        C[3] += 1

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

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

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

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

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


a=0
b=0
c=0
d=0

for i in range(N):
    s = input()
    if s=="AC":
        a+=1
    elif s=="WA":
        b+=1
    elif s=="TLE":
        c+=1
    elif s=="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 = [input() for i in range(n)]

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

Solution (Python):
n = int(input())
a = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0
for s in a:
  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):
num=int(input())
count_AC=0
count_WA=0
count_TLE=0
count_RE=0

def judge(x):
        global count_AC
        global count_WA
        global count_TLE
        global count_RE
        if x=='AC':
            count_AC+=1
        if x=='WA':
            count_WA+=1
        if x=='TLE':
            count_TLE+=1
        if x=='RE':
            count_RE+=1

for i in range(num):
        judge(input())

print('AC x',str(count_AC),'\nWA x',str(count_WA),'\nTLE x',str(count_TLE),'\nRE x',str(count_RE))

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

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

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


for i in answers:
    print(i + " x " + str(answers[i]))

Solution (Python):
import sys
from io import StringIO
import unittest
from collections import Counter

def resolve():
    
    n = int(input())
    
    
    s = Counter([input() for _ in range(n)])

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

    for ac in ans:
        print(ac + ' x ' + str(s[ac]))




class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """6
AC
TLE
AC
AC
WA
TLE"""
        output = """AC x 3
WA x 1
TLE x 2
RE x 0"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC"""
        output = """AC x 10
WA x 0
TLE x 0
RE x 0"""
        self.assertIO(input, output)


if __name__ == "__main__":
    
    resolve()

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

for _ in range(N):
    x = input()
    if x == 'AC':
        ac += 1
    elif x == 'WA':
        wa += 1
    elif x == 'TLE':
        tle += 1
    else:
        re += 1

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

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

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


for i in range(N):
	word = input()
	if word =="AC":
		AC+=1
	if word =="WA":
		WA+=1
	if word =="TLE":
		TLE+=1
	if word =="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):
num = int(input())
word = {"AC":0, "WA":0, "TLE":0, "RE":0}
 
for i in range(num):
    judge = input()
    if judge in word:
        word[str(judge)] += 1
    else:
        pass
        
        
print("AC x " + str(word["AC"]))
print("WA x " + str(word["WA"]))
print("TLE x " + str(word["TLE"]))
print("RE x " + str(word["RE"]))

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

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

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

N = []

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

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

for i in range(N_num):
    
    
    if 'AC' == N[i]:
        AC_num += 1
        
    
    elif 'WA' == N[i]:
        WA_num += 1
        

    elif 'TLE' == N[i]:
        TLE_num += 1
        
    
    elif 'RE' == N[i]:
        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):
import sys 

def A():
  n = int(sys.stdin.readline().rstrip())
  charge = (n+999)//1000 * 1000 - n
  print(charge)
  pass

from collections import Counter
def B():
  n, *s = sys.stdin.read().split() 
  c = Counter(s)
  for v in 'AC, WA, TLE, RE'.split(', '):
    print(f'{v} x {c[v]}')
  pass


def C():
  pass


def D():
  pass


def E():
  pass


def F():
  pass

if __name__ == "__main__":
  
  B()
  C()
  D()
  E()
  F()

Solution (Python):
from collections import Counter

N = int(input())
ct = Counter(input() for _ in range(N))
for s in ('AC', 'WA', 'TLE', 'RE'):
    print(s, 'x', ct[s])

Solution (Python):
N = int(input())
array = []
for _ in range(N):
  array.append(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for test in array:
  if 'AC' == test:
    AC += 1
  elif 'WA' == test:
    WA += 1
  elif 'TLE' == test:
    TLE += 1
  elif 'RE' == test:
    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())
AC = []
WA = []
TLE = []
RE = []

while N >= 1:
    Sn = input()
    if Sn == 'AC':
        AC.append(1)
    if Sn == 'WA':
        WA.append(1)
    if Sn == 'TLE':
        TLE.append(1)
    if Sn == 'RE':
        RE.append(1)
    N = N - 1
    
print('AC x ' + str(sum(AC)))
print('WA x ' + str(sum(WA)))
print('TLE x ' + str(sum(TLE)))
print('RE x ' + str(sum(RE)))

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

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

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

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

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

returns = []
ans = [0,0,0,0]

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

for j in range(N):
    if returns[j] == 'AC':
        ans[0] += 1
        continue
    if returns[j] == 'WA':
        ans[1] += 1
        continue
    if returns[j] == 'TLE':
        ans[2] += 1
        continue
    if returns[j] == 'RE':
        ans[3] += 1
        continue

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

Solution (Python):
import sys
import collections


try:
    sys.stdin = open(sys.path[0] + '/input.txt', 'r')
    sys.stdout = open(sys.path[0] + '/output.txt', 'w')
except FileNotFoundError:
    pass


hmap = collections.defaultdict(int)

for i in range(int(input())):
    s = input()
    hmap[s] += 1


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

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

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

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

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())
d = defaultdict(lambda: 0)
for i in range(N):
    d[input()] += 1

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

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

for i in range(1,N+1):
  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())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    S = input()
    if S == "AC":
        AC += 1
    if S == "WA":
        WA += 1
    if S == "TLE":
        TLE += 1
    if S == "RE":
        RE += 1
ans = "AC x " + str(AC) + "\n"
ans = ans + "WA x " + str(WA) + "\n"
ans = ans + "TLE x " + str(TLE) + "\n"
ans = ans + "RE x " + str(RE)
print(ans)

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

list = []
dic = {}
for i in range(num):
    k = input()
    dic[k] = dic.get(k,0) +1
for i in ["AC","WA","TLE","RE"]:
    if i in dic.keys():
        print(i,"x",dic[i])
    else:
        print(i,"x",0)

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random,resource

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    a = [S() for _ in range(n)]

    c = collections.Counter(a)
    k = ['AC', 'WA', 'TLE', 'RE']
    rr = []
    for s in k:
        rr.append(f"{s} x {c[s]}")

    return JA(rr, "\n")


print(main())

Solution (Python):



n = int(input())

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


c0=0
c1=0
c2=0
c3=0
for i in s:
    if i == "AC":
        c0+=1
    elif i == "WA":
        c1+=1
    elif i == "TLE":
        c2+=1
    else:
        c3+=1

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

Solution (Python):
from collections import Counter

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

counter = Counter(s)

for x in ['AC', 'WA', 'TLE', 'RE']:
    n = counter[x]
    print("{} x {}".format(x,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
    else:
        re += 1

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

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

for j in dic:
    print(j + ' x ' + str(dic[j]))

Solution (Python):
N = int(input())
A = 0
W = 0
T = 0
R = 0
for i in range(1, N+1):
  s = str(input())
  if s == "AC":
    A = A + 1
  elif s == "WA":
    W = W + 1
  elif s == "TLE":
    T = T + 1
  elif s == "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):
k = {"AC":0, "WA":0, "TLE":0, "RE":0}

n = int(input())

for i in range(0, n):
    x = input()
    k[x] += 1

for i in k:
    print(i + " x " + str(k[i]))

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

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

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

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

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

for i in range(n):
  s =input()
  dic[s] +=1
for i in col:
  print(f'{i} x {dic[i]}')

Solution (Python):
import collections

n = int(input())
c = collections.Counter([input() for i in range(n)])
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())
c0 = c1 = c2 = c3 = 0

for i in range(N):
  judge = input()
  if judge == "AC":
    c0 += 1
  elif judge == "WA":
    c1 += 1
  elif judge == "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):
a,b,c,d = 0,0,0,0
for N in range(int(input())):
    s = input()
    if s == 'AC':
        a+=1
    if s == 'WA':
        b+=1
    if s == 'TLE':
        c+=1
    if s == 'RE':
        d+=1
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)

Solution (Python):
def main():
    import sys
    readline = sys.stdin.buffer.readline
    sys.setrecursionlimit(10 ** 7)

    from collections import Counter

    n = int(readline())
    s = [readline().rstrip().decode() for _ in range(n)]
    counter = Counter(s)
    print('AC x {}'.format(counter['AC']))
    print('WA x {}'.format(counter['WA']))
    print('TLE x {}'.format(counter['TLE']))
    print('RE x {}'.format(counter['RE']))


if __name__ == '__main__':
    main()

Solution (Python):
def judge_status_summary():
    
    N = int(input())
    S = [input() for _ in range(N)]
    
    
    result_list = ['AC', 'WA', 'TLE', 'RE']
    count_list = [0, 0, 0, 0]
    
    for i in range(N):
        one_count_up_inxex = result_list.index(S[i])
        count_list[one_count_up_inxex] += 1
    
    for i in range(4):
        print(result_list[i], 'x', count_list[i])

judge_status_summary()

Solution (Python):
import sys
s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2sss = lambda n: [list(sys.stdin.readline().rstrip()) for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))
from collections import deque  
from collections import defaultdict  
from heapq import heapify, heappush, heappop, heappushpop  
from bisect import bisect_left, bisect_right  
sys.setrecursionlimit(int(1e+6))
MOD = int(1e+9) + 7



def main():
    N = i2n()
    keys = ['AC', 'WA', 'TLE', 'RE']
    d = {}
    for k in keys:
        d[k] = 0
    for _ in range(N):
        s = i2s()
        d[s] += 1
    for k in keys:
        print('%s x %d' % (k, d[k]))

main()

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

for i, j in enumerate(['AC', 'WA', 'TLE', 'RE']):
    print(j+' x %d' % ans[i])

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

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

for _ in range(count):
    i = input()
    if i == 'AC':
        ac += 1
    if i == 'WA':
        wa += 1
    if i == 'TLE':
        tle += 1
    if i =='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 _ 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):
judge = ['AC', 'WA', 'TLE', 'RE']
res = dict()
for x in judge:
    res[x] = 0

n = int(input())
for _ in range(n):
    s = input()
    res[s] += 1
for x in judge:
    print(x+' x '+str(res[x]))

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

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

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

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

Solution (Python):
n = int(input())
s = [input() for _ in range(n)]
l = ["AC","WA","TLE","RE"]
for i in range(4):  print(l[i],"x",s.count(l[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
  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):
n=int(input())
slist=''
for i in range(n):
    slist += input()
print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(slist.count('AC'),slist.count('WA'),slist.count('TLE'),slist.count('RE')))

Solution (Python):
x=int(input(''))
y=[0]*x
for i in range(x):
  y[i]=input('')
a=0
w=0
t=0
r=0
for i in range(x):
  if y[i]=='AC':
    a=a+1
  elif y[i]=='WA':
    w=w+1
  elif y[i]=='TLE':
    t=t+1
  else:
    r=r+1
print('AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}'.format(a,w,t,r))

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

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

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


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

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

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

for roop in range(N):
    judge = input()
    if judge == "AC":
        count["AC"] += 1
    elif judge == "WA":
        count["WA"] += 1
    elif judge == "TLE":
        count["TLE"] += 1
    elif judge == "RE":
        count["RE"] += 1
for roop2 in count.keys():
    print(roop2 + " x " + str(count[roop2]))

Solution (Python):
"""
atcoder : 173B
auther : Jay Saha
handel : ponder2000
date : 15/07/2020
"""

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

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

Solution (Python):
from collections import Counter

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

ctr = Counter(s)

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

Solution (Python):
from collections import Counter

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

ctr = Counter(s)

print(f"AC x {0 if ctr.get('AC') is None else ctr.get('AC')}")
print(f"WA x {0 if ctr.get('WA') is None else ctr.get('WA')}")
print(f"TLE x {0 if ctr.get('TLE') is None else ctr.get('TLE')}")
print(f"RE x { 0 if ctr.get('RE') is None else ctr.get('RE')}")

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

cases = ['AC', 'WA', 'TLE', 'RE']
ans = [0, 0, 0, 0]
for _ in range(n):
    s = input()
    for i, case in enumerate(cases):
        if s == case:
            ans[i] += 1

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

Solution (Python):
a = int(input())
c = {}
c['AC'] = c['WA'] = c['TLE'] = c['RE'] = (int)(0)
for _ in range(a):
  c[input()]+=1
print('AC x ', end = '')
print(c['AC'])

print('WA x ', end = '')
print(c['WA'])

print('TLE x ', end = '')
print(c['TLE'])

print('RE x ', end = '')
print(c['RE'])

Solution (Python):


import bisect
import copy
import collections
import heapq
import itertools
import math
import numpy as np
from operator import itemgetter
import scipy.misc
import sys

"""

N, X = map(int, input().split())

x = list(map(int, input().split()))

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())
"""


N=int(input())
S = [input() for n in range(N)]
s_counter = collections.Counter(S)
def main():
    cases = ["AC", "WA", "TLE", "RE"]
    for case in cases:
        cnt = 0
        if case in s_counter.keys():
            cnt =s_counter[case]
        print(case+" x "+str(cnt))
        
    return
    

if __name__ == '__main__':
    main()

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

list = []
for i in range(N):
    list.append(str(input()))
a = list.count("AC")
b = list.count("WA")
c = list.count("TLE")
d = list.count("RE")

print("AC x",a)
print("WA x" ,b)
print("TLE x" ,c)
print("RE x" ,d)

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

dic = {'AC':0,'WA':0,'TLE':0,'RE':0}
for s in S:
    if s in dic.keys():
        dic[s] += 1

for key,value in zip(dic.keys(),dic.values()):
    print(key+' x '+str(value))

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

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

n=int(input())
for _ in range(n):
    dic[input().rstrip()]+=1

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

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

list=[]
for i in range(N):
    list.append(str(input()))


a = list.count("AC")
b = list.count("WA")
c = list.count("TLE")
d = list.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())
S = [input() for _ in range(n)]

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

for s in S:
    if s == 'AC':
        num_ac += 1
    elif s == 'WA':
        num_wa += 1
    elif s == 'TLE':
        num_tle += 1
    else:
        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):

iAC = 0
iWA = 0
iTLE = 0
iRE = 0

N = int(input())
for i in range(N):
    S = input()
    if S == "AC":
        iAC += 1
    elif S == "WA":
        iWA += 1
    elif S == "TLE":
        iTLE += 1
    elif S == "RE":
        iRE += 1

print("AC x {}".format(iAC))
print("WA x {}".format(iWA))
print("TLE x {}".format(iTLE))
print("RE x {}".format(iRE))

Solution (Python):

iAC = 0
iWA = 0
iTLE = 0
iRE = 0

N = int(input())
for i in range(N):
    S = input()
    if S == "AC":
        iAC += 1
    elif S == "WA":
        iWA += 1
    elif S == "TLE":
        iTLE += 1
    elif S == "RE":
        iRE += 1

print("AC x {}".format(iAC))
print("WA x {}".format(iWA))
print("TLE x {}".format(iTLE))
print("RE x {}".format(iRE))

Solution (Python):
i = int(input())
case = [input() for c in range(i)]
ans = [0,0,0,0]
ac = case.count("AC")
wa = case.count("WA")
tle = case.count("TLE")
re= case.count("RE")
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))

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

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

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

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

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

for i in s:
    if i == 'AC':
        dic['AC'] += 1
    elif i == 'WA':
        dic['WA'] += 1
    elif i == 'TLE':
        dic['TLE'] += 1
    else:
        dic['RE'] += 1

for i in dic:
    
    print("{0} x {1}".format(i, dic[i]))

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

AC_count = 0
WA_count = 0
TLE_count = 0
RE_count = 0

for i in range(N):
  s = input()
  if s == 'AC':
    AC_count += 1
  elif s == 'WA':
    WA_count += 1
  elif s == 'TLE':
    TLE_count += 1
  elif s == 'RE':
    RE_count += 1
    
print("AC x {}".format(AC_count))
print("WA x {}".format(WA_count))
print("TLE x {}".format(TLE_count))
print("RE x {}".format(RE_count))

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

ac = 0
wa = 0
tle = 0
re = 0
for i in S:
    if i=='AC':
        ac+=1
    elif i=='WA':
        wa+=1
    elif i=='TLE':
        tle+=1
    else:
        re+=1
print('AC x '+str(ac))
print('WA x '+str(wa))
print('TLE x '+str(tle))
print('RE x '+str(re))

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

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

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

for key, value in result.items():
    print(f'{key} x {value}')

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

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())
ans_list = [0,0,0,0]

for i in range(n):
    s = input()
    if s == 'AC':
        ans_list[0] += 1
    elif s == 'WA':
        ans_list[1] += 1
    elif s == 'TLE':
        ans_list[2] += 1
    else:
        ans_list[3] += 1

for i in range(len(ans_list)):
    if i == 0:
        print('AC x ' + str(ans_list[i]))
    elif i == 1:
        print('WA x ' + str(ans_list[i]))
    elif i == 2:
        print('TLE x ' + str(ans_list[i]))
    else:
        print('RE x ' + str(ans_list[i]))

Solution (Python):
import sys


def input(): return sys.stdin.readline().strip()


def main():
    N = int(input())
    di = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}

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

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


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    N = int(input())
    di = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}

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

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


if __name__ == "__main__":
    main()

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

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

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

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

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

for s in S:
    if s=='AC':
        AC+=1
    if s=='WA':
        WA+=1
    if s=='TLE':
        TLE+=1
    if s=='RE':
        RE+=1
print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(AC,WA,TLE,RE))

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


a=0
b=0
c=0
d=0

for i in range(N):
    s = input()
    if s=="AC":
        a+=1
    elif s=="WA":
        b+=1
    elif s=="TLE":
        c+=1
    elif s=="RE":
        d+=1 
    
print("AC x "+str(a))
print("WA x "+str(b))
print("TLE x "+str(c))
print("RE x "+str(d))