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 = ["a"] * N
for i in range(N):
    S[i] = input()

count_ac = 0
count_wa = 0
count_tle = 0
count_re = 0

for i in range(N):
    if S[i] == "AC":
        count_ac += 1
    elif S[i] == "WA":
        count_wa += 1
    elif S[i] == "TLE":
        count_tle += 1
    elif S[i] == "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())
s =list(input() for i in range(N))
DP = [0]*4
for j in range(N):
    if s[j] == "AC":
        DP[0] += 1
    elif s[j] == "WA":
        DP[1] += 1
    elif s[j] == "TLE":
        DP[2] += 1
    else:
        DP[3] += 1

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

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

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

Solution (Python):
def main():
    N = int(input())
    statusDict = {"AC":0, "WA":0, "TLE":0, "RE":0}
    
    for i in range(N):
        status = input()
        statusDict[status] = statusDict[status] + 1

    for key in statusDict.keys():
        print(key + " x " + str(statusDict[key]))

if __name__ == "__main__":
    main()

Solution (Python):
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt, gcd
from copy import deepcopy
from functools import reduce

def main():
    n = int(input())
    lists = []
    ans = [0]*4
    for i in range(n):
        s = input()
        if not s in lists:
            lists.append(s)


        if s == "AC":
            ans[0] += 1
        elif s == "WA" :
            ans[1] += 1
        elif s == "TLE":
            ans[2] += 1
        else:
            ans[3] += 1
    

    for i in range(len(ans)):
        if i == 0:
            print("AC x", ans[i])
        elif i == 1 :
            print("WA x", ans[i])
        elif i == 2:
            print("TLE x", ans[i])
        else:
            print("RE x", ans[i])


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for s in range(0, 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 {}'.format(AC))
print('WA x {}'.format(WA))
print('TLE x {}'.format(TLE))
print('RE x {}'.format(RE))

Solution (Python):
import collections as co
n = int(input())

test = co.Counter(list(input() for i in range(n)))

print("AC x " + str(test.get('AC') if test.get('AC') != None else 0))
print("WA x " + str(test.get('WA') if test.get('WA') != None else 0))
print("TLE x " + str(test.get('TLE') if test.get('TLE') != None else 0))
print("RE x " + str(test.get('RE') if test.get('RE') != None else 0))

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

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

total=0
total2=0
total3=0
total4=0

for i in range(0,N):
      A = str(input(""))
      if A=="AC":
            total=total+1
      elif A=="WA":
            total2=total2+1      
      elif A=="TLE":
            total3=total3+1
      else:
            total4=total4+1

print("AC x",total,)
print("WA x",total2,)
print("TLE x",total3,)
print("RE x",total4,)

Solution (Python):


N = int(input())

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

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

for s in S:
    count_map[s] += 1

for count_key, count in count_map.items():
    print(count_key + " x " + str(count))

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())
S = [input() for x in range(N)]
dic = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(N):
    dic[S[i]] += 1
print('AC x '+ str(dic['AC']))
print('WA x '+ str(dic['WA']))
print('TLE x '+ str(dic['TLE']))
print('RE x '+ str(dic['RE']))

Solution (Python):
n = int(input())
a,w,t,r = 0,0,0,0
for i in range(n):
  tmp = input()
  if tmp=='AC':
    a+=1
  elif tmp=='WA':
    w+=1
  elif tmp=='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 = int(input())
S = [input() for i in range(N)]

ac, wa, tle, re = 0, 0, 0, 0
for i in range(len(S)):
    if S[i] == 'AC':
        ac = ac + 1
    elif S[i] == 'WA':
        wa = wa + 1
    elif S[i] == 'TLE':
        tle = tle + 1
    elif S[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())
state = [input() for _ in range(N)]

for k in ['AC', 'WA', 'TLE', 'RE']:
    print('{0} x {1}'.format(k, state.count(k)))

Solution (Python):
n = int(input())
s=0
t=0
u=0
v=0
for i in range(n):
  f = input()
  if(f=="AC"):
    s+=1
  elif(f=="WA"):
    t+=1
  elif(f=="TLE"):
    u+=1
  else:
    v+=1
    
print("AC x",s,"\nWA x",t,"\nTLE x",u,"\nRE x",v)

Solution (Python):
n = int(input())
s = [input() for i in range(n)]
AC = 0
WA = 0
TLE = 0
RE = 0
for j in range(n):
  if s[j] == 'AC':
    AC += 1
  elif s[j] == 'WA':
    WA += 1
  elif s[j] == '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 _ 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())
dic={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  s=str(input())
  dic[s]=dic[s]+1
for k,l in dic.items():
  print("{} x {}".format(k,l))

Solution (Python):
n = int(input())
a = []
for i in range(n):
  s = input()
  a.append(s)
b,c,d,e = 0,0,0,0
for i in range(n):
  if(a[i] == 'AC'):
    b += 1
  elif(a[i] == 'WA'):
    c += 1
  elif(a[i] == 'TLE'):
    d += 1
  else:
    e += 1
print('AC', 'x', b)
print('WA', 'x', c)
print('TLE', 'x', d)
print('RE', 'x', e)

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

Solution (Python):
n = int(input())
s = []
for i in range(n):
    s.append(input())
jg = ['AC', 'WA', 'TLE', 'RE']
co = [0] * 4
for i in s:
    co[jg.index(i)] += 1
for i in range(4):
    print('{} x {}'.format(jg[i], co[i]))

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

for i in range(n):
    test = input()
    if test == "AC":
        c0 += 1
    elif test == "WA":
        c1 += 1
    elif test == "TLE":
        c2 +=1
    elif test == "RE":
        c3 += 1
print("AC x", c0)
print("WA x", c1)
print("TLE x", c2)
print("RE x", c3)

Solution (Python):
n=int(input())
L=[0]*4
for i in range(n):
    s=input()
    if "AC"==s:
        L[0] += 1
    elif "WA"==s:
        L[1] += 1
    elif "TLE"==s:
        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):
from collections import Counter
n = int(input())
s = [input() for _ in range(n)]

l = Counter(s)

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

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

numAC = 0
numWA = 0
numTLE = 0
numRE = 0

for i in s:
    if i == "AC":
        numAC += 1
    elif i == "WA":
        numWA += 1
    elif i == "TLE":
        numTLE += 1
    elif i == "RE":
        numRE += 1
        

print("AC x " + str(numAC))
print("WA x " + str(numWA))
print("TLE x " + str(numTLE))
print("RE x " + str(numRE))

Solution (Python):
N = int(input())
S = list(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):
S = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for _ in range(int(input())):
	string = input()
	S[string] +=1
for s, no in S.items():
	print(s," x ",no)

Solution (Python):
import collections

n=int(input())
str_list = [input() for _ in range(n)]
c = collections.Counter(str_list)



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

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

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

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

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

Solution (Python):
import sys
from collections import Counter
import math

counts = Counter(line.strip() for line in sys.stdin)

for key in ["AC", "WA", "TLE", "RE"]:
  if key not in counts:
    print("{} x 0".format(key))
  else:
    print("{} x {}".format(key, counts[key]))

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

d = dict()

for _ in range(n):
    k = input()
    if d.get(k):
        d[k] += 1
    else:
        d[k] = 1

for kk in ['AC', 'WA', 'TLE', 'RE']:
    if d.get(kk):
        print(kk + ' x ' + str(d.get(kk)))
    else:
        print(kk + ' x 0')

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):
AC = 0
WA = 0
TLE = 0
RE = 0

n = int(input())

for i in range(n):
  d = input()
  if d == 'AC':
    AC += 1
  elif d == 'WA':
    WA += 1
  elif d == '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())

count = 0
S = []

while count < N:
    S.append(input())
    count = count + 1


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

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

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

if 'AC' in c.keys():
    print('AC x', c['AC'])
else:
    print('AC x 0')
if 'WA' in c.keys():
    print('WA x', c['WA'])
else:
    print('WA x 0')
if 'TLE' in c.keys():
    print('TLE x', c['TLE'])
else:
    print('TLE x 0')
if 'RE' in c.keys():
    print('RE x', c['RE'])
else:
    print('RE x 0')

Solution (Python):
from copy import deepcopy
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions
from operator import itemgetter
import itertools
import copy


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


def gcd(a, b):
    while(b != 0):
        a, b = b, a % b
    return a



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
n = int(input())
tmp = [0]*4
for _ in range(n):
    s = input()
    if s == 'AC':
        tmp[0] += 1
    if s == 'WA':
        tmp[1] += 1
    if s == 'TLE':
        tmp[2] += 1
    if s == 'RE':
        tmp[3] += 1

print('AC', 'x', tmp[0],)
print('WA', 'x', tmp[1],)
print('TLE', 'x', tmp[2],)
print('RE', 'x', tmp[3],)

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

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

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

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

for i in range(n):
  x = input()
  if x == "RE": re+=1
  if x == "TLE": tle+=1
  if x == "AC": ac+=1
  if x == "WA": wa+=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 = []
C0 = 0
C1 = 0
C2 = 0
C3 = 0

for i in range(n):
  m = input()
  S.append(m)
  if m == 'AC':
    C0 += 1
  elif m == 'WA':
    C1 += 1
  elif m == 'TLE':
    C2 += 1
  elif m == 'RE':
    C3 += 1
    
print('AC x', C0)
print('WA x', C1)
print('TLE x', C2)
print('RE x', C3)

Solution (Python):
import numpy as np

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

Solution (Python):
def resolve():
    n = int(input())
    listS = []
    for i in range(n):
        s = input()
        listS.append(s)
    ac = listS.count("AC")
    tle = listS.count("TLE")
    wa = listS.count("WA")
    re = listS.count("RE")
    print("AC x {}".format(ac))
    print("WA x {}".format(wa))
    print("TLE x {}".format(tle))
    print("RE x {}".format(re))
    
resolve()

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

A = [0,0,0,0]

for i in range (0, N):
    S = str(input())
    if S == 'AC':
        A[0]+=1
    if S == 'WA':
        A[1]+=1
    if S == 'TLE':
        A[2]+=1
    if S == 'RE':
        A[3]+=1

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

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

import collections

C = collections.Counter(S)

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

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

a = [0] * 4

for i in range(N):
  result = input()
  if (result == 'AC'):
    a[0] += 1
  elif (result == 'WA'):
    a[1] += 1
  elif (result == 'TLE'):
    a[2] += 1
  else:
    a[3] += 1

print('AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}'.format(a[0], a[1], a[2], a[3]))

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

Solution (Python):
def main():
    import sys
    N=int(sys.stdin.readline())
    dic={
        'AC':0,
        'WA':0,
        'TLE':0,
        'RE':0,
    }
    for i in range(N):
        S=sys.stdin.readline()
        dic[S.strip()]+=1
    
    for key,val in dic.items():
        print('{} x {}'.format(key,val))

main()

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())
ac = 0
wa = 0
tle = 0
re = 0
for s 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):

import collections
import sys
import copy
import re


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


def main():
    N = I()
    Si = [0]*(4)
    s = ["AC", "WA", "TLE", "RE"]
    for _ in range(N):
        a = S()
        for j, ss in enumerate(s):
            if a == ss:
                Si[j] += 1
                break

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


if __name__ == '__main__':
    main()

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

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

for s in str_list:
    if s == "AC":
        AC += 1
    elif s == "WA":
        WA += 1
    elif s == "TLE":
        TLE += 1
    elif s == "RE":
        RE += 1

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

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

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

Solution (Python):
num = input().rstrip()
line = []
for i in range(int(num)):
    line.append(input().rstrip())
line_ac = [s for s in line if "AC" in s]
line_wa = [s for s in line if "WA" in s]
line_tle = [s for s in line if "TLE" in s]
line_re = [s for s in line if "RE" in s]

print("AC x " + str(len(line_ac)))
print("WA x " + str(len(line_wa)))
print("TLE x " + str(len(line_tle)))
print("RE x " + str(len(line_re)))

Solution (Python):
n=int(input())
S=[input() for i in range(n)]
a=[0]*4
a[0]="AC"
a[1]="WA"
a[2]="TLE"
a[3]="RE"
c=[0]*4
for i in range(4):
  c[i]=S.count(a[i])
for i in range(4):
  print(a[i],"","x","",c[i])

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

Solution (Python):
import os

N = int(input())
S = [0] * N

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

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
    elif i == "RE":
        RE+=1

print("AC x",AC)
print("WA x",WA)
print("TLE x",TLE)
print("RE x",RE)

Solution (Python):
n=int(input())
d={"AC":0,"WA":0,"TLE":0,"RE":0}
for ii in range(n):
	s=input()
	d[s]=d[s]+1
for ii in d.items():
  print(" x ".join([str(jj) for jj in list(ii)]))

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",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):
  str = input()
  if str == "AC":
    AC += 1
  elif str == "WA":
    WA += 1
  elif str == "TLE":
    TLE += 1
  elif str == "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):
from collections import defaultdict
N = int(input())
s = defaultdict(int)
for i in range(N):
    a = input()
    s[a] += 1
ls = ['AC', 'WA', 'TLE', 'RE']
for x in ls:
    print(x + ' x ' + str(s[x]))

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):
li=["AC","WA","TLE","RE"]
l=[0]*4
for i in range(int(input())):
    n=input()
    if n=="AC":l[0]+=1
    if n == "WA": l[1] += 1
    if n == "TLE": l[2] += 1
    if n == "RE": l[3] += 1
for i in range(4):
    print(li[i],"x",l[i])

Solution (Python):
d = {}
d["AC"] = 0
d["WA"] = 0
d["TLE"] = 0
d["RE"] = 0

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

for s in ["AC", "WA", "TLE", "RE"]:
    print(s + " x " + str(d[s]))

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

c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i in range(n):
    if s[i] == 'AC':
        c0 += 1
    if s[i] == 'WA':
        c1 += 1
    if s[i] == 'TLE':
        c2 += 1
    if s[i] == 'RE':
        c3 += 1

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

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

Solution (Python):
_num_of_cases = int(input())
_AC = 0
_WA = 0
_TLE = 0
_RE = 0
for _i in range(_num_of_cases):
  _result = input()
  if _result == "AC":
    _AC += 1
  elif _result == "WA":
    _WA += 1
  elif _result == "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())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for _ in range(n):
    word = input()
    if word=='AC':
        c0 +=1
    elif word == 'WA':
        c1 +=1
    elif word == '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())

s_list = []
for i in range(n):
    s_list.append(input())





print("AC x {0}".format(s_list.count("AC")))
print("WA x {0}".format(s_list.count("WA")))
print("TLE x {0}".format(s_list.count("TLE"))) 
print("RE x {0}".format(s_list.count("RE")))

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

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

for _ in range(n):
    ans[input()] += 1

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

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

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())
p = []
for i in range(n):
    a = input()
    p.append(a)
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    if p[i] == 'AC':
        ac += 1
    elif p[i] == 'WA':
        wa += 1
    elif p[i] == 'TLE':
        tle += 1
    else:
        re += 1
ans = 'AC x'
print(ans,str(ac), sep = ' ',)
ans = 'WA x'
print(ans,str(wa), sep = ' ')
ans = 'TLE x'
print(ans,str(tle), sep = ' ')
ans = 'RE x'
print(ans,str(re), sep = ' ')

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

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

count_ac = 0
count_wa = 0
count_tle = 0
count_re = 0

for i in lists:
    if i == 'AC':
        count_ac += 1
    elif i == 'WA':
        count_wa += 1
    elif i == 'TLE':
        count_tle += 1
    elif i == 'RE':
        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())
a=0
b=0
c=0
d=0
for i in range(N):
    A=input()
    if A=="AC":
        a+=1
    elif A=="WA":
        b+=1
    elif A=="TLE":
        c+=1
    else:
        d+=1
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)

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

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())
result = {}
l = ['AC','WA','TLE','RE']
for i in l:
    result[i] = 0
for _ in range(n):
    result[input()] += 1
for i in l:
    print(f'{i} x {result[i]}')

Solution (Python):
z=[]
ac=[]
wa=[]
tle=[]
re=[]
a=int(input())
for i in range(a):
    b=input()
    z.append(b)
for i in z:
    if i=='AC':
        ac.append(1)
for i in z:
    if i=='WA':
        wa.append(1)
for i in z:
    if i=='TLE':
        tle.append(1)
for i in z:
    if i=='RE':
        re.append(1)
        
print('AC x ',len(ac))
print('WA x ',len(wa))
print('TLE x ',len(tle))
print('RE x ',len(re))

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

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())
ac,wa,tle,re = [0 for i in range(4)]
for i in range(N):
    val = input()
    if val == "AC":
        ac += 1
    elif val == "WA":
        wa += 1
    elif val == "TLE":
        tle += 1
    elif val == "RE":
        re += 1
    else:
        pass
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())
l =[]
for i in range(n):
  st= str(input())
  l.append(st)
AC= l.count("AC")
WA = l.count("WA")
TLE=l.count("TLE")
RE =l.count("RE")
print("AC x",AC)
print("WA x",WA)
print("TLE x",TLE)
print("RE x ",RE)

Solution (Python):
import sys
import math
import fractions
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(10**7)

N = int(input())

d = defaultdict(int)
for i in range(N):
    S = input()
    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']))

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

statuses = []

for _ in range(n):
    statuses.append(input())

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

for status in statuses:
    status_count[status] += 1

for key, value in status_count.items():
    print('{s} x {n}'.format(s=key, n=value))

Solution (Python):
N=int(input())
l=[]
for i in range(N):
  a=input()
  l.append(a)
AC_num=l.count("AC")
WA_num=l.count("WA")
TLE_num=l.count("TLE")
RE_num=l.count("RE")
print("AC x",AC_num)
print("WA x",WA_num)
print("TLE x",TLE_num)
print("RE x",RE_num)

Solution (Python):

import sys

def main():
  
  N = int(input())
  AC=0
  WA=0
  TLE=0
  RE=0

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

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
s = [list( input().split() ) for i in range(n)]
c = [0, 0, 0, 0]

for i in range(n):
  if s[i] == ['AC']:
    c[0] += 1
  if s[i] == ['WA']:
    c[1] += 1
  if s[i] == ['TLE']:
    c[2] += 1
  if s[i] == ['RE']:
    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):

import collections

N=int(input())
li=[]
for i in range(N):
    s=input()
    li.append(s)



c = collections.Counter(li)




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):
di = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
n = int(input())
for _ in range(n):
    di[input()] += 1
[print(f"{key} x {val}") for key,val in di.items()]

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

Solution (Python):
import sys
n = int(sys.stdin.readline().rstrip("\n"))
result = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for _ in range(n):
    s = sys.stdin.readline().rstrip("\n")
    result[s] += 1
for r in result.keys():
    print(r+" x "+str(result[r]))