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):
import sys
input = sys.stdin.readline

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

AC_c = 0
WA_c = 0
TLE_c = 0
RE_c = 0
for S in S_list:
    if S == "AC\n":
        AC_c += 1
    elif S == "WA\n":
        WA_c += 1
    elif S == "TLE\n":
        TLE_c += 1
    else:
        RE_c += 1
print("AC x " + str(AC_c))
print("WA x " + str(WA_c))
print("TLE x " + str(TLE_c))
print("RE x " + str(RE_c))

Solution (Python):
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))



def a_int(): return int(read())


def ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) 
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    


MOD = 10**9 + 7
INF = 2**31  

from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  
from functools import reduce
from math import gcd


def lcm(a, b):
    
    g = gcd(a, b)
    return a // g * b


N = a_int()
S = []
for _ in range(N):
    S.append(read()[:-1])
cnt = Counter(S)
print('AC x', cnt['AC'])
print('WA x', cnt['WA'])
print('TLE x', cnt['TLE'])
print('RE x', cnt['RE'])

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

ans=["","","",""]
ans[0]="AC x "+str(c[0])
ans[1]="WA x "+str(c[1])
ans[2]="TLE x "+str(c[2])
ans[3]="RE x "+str(c[3])

for i in range(4):
    print(ans[i])

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

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

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

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

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

Solution (Python):
n = int(input())
a = ["AC"] * n
c = [0]*4

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

for i in range(N):
    S = input()
    s.append(S)
    i += 1

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

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

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


a=0
b=0
c=0                
d=0                
                
for i in range(n):
    if str_list[i] == 'AC':
    	a += 1
    elif str_list[i] == 'WA':
    	b += 1
    elif str_list[i] == 'TLE':
    	c +=1
    else :
    	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())
list = [input() for i in range(N)]

C0 = list.count("AC")
C1 = list.count("WA")
C2 = list.count("TLE")
C3  = list.count("RE")

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

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

a = []

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

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

Solution (Python):
ac = 0
wa = 0
tle = 0
re = 0

num = int(input())

while(num>0):

	tipo = input().upper()
	
	if(tipo == "AC"): ac+=1
	elif(tipo == "WA"): wa+=1
	elif(tipo == "TLE"): tle+=1
	elif(tipo == "RE"): re+=1
	
	num-=1

print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(ac,wa,tle,re))

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

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

for i in range(N):
  TEST = input()
  if TEST == "AC":
    AC += 1
  elif TEST == "WA":
    WA += 1
  elif TEST == "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)]
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 collections
N = int(input())
S = []
for _ in range(N):
  S.append(input())

counter = collections.Counter(S)
AC = counter['AC']
WA = counter['WA']
TLE = counter['TLE']
RE = counter['RE']

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

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

aa=["AC","WA","TLE","RE"]
for a in aa:
    print("{} x {}".format(a,str(s.count(a))))

Solution (Python):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
others = 0
for i in range(N):
  case = input()
  if case == "AC":
    AC += 1
      
  elif case == "WA":
    WA += 1
      
  elif case == "TLE":
    TLE += 1
      
  elif case == "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):
a = int(input())
 
AC = 0
WA = 0
TLE = 0
RE = 0
 
for i in range(a):
    s = input()
    if s == "AC":
        AC = AC + 1
        continue
    if s == "WA":
        WA = WA + 1
        continue
    if s == "TLE":
        TLE = TLE + 1
        continue
    if s == "RE":
        RE = RE + 1
        continue
 
 
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_num = 0
tle_num = 0
wa_num = 0
re_num = 0
for i in range(N):
  result = input()
  if result == "AC":
    ac_num += 1
  elif result == "TLE":
    tle_num += 1
  elif result == "WA":
    wa_num += 1
  else:
    re_num += 1
    
print("AC x " + str(ac_num))
print("WA x " + str(wa_num))
print("TLE x " + str(tle_num))
print("RE x " + str(re_num))

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

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):
l = []
for _ in range(int(input())):
    l.append(input())
from collections import Counter
c = Counter(l)
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())
S=[]
for _ in range(N):
  s=input()
  S.append(s)
  
C0=S.count("AC")
C1=S.count("WA")
C2=S.count("TLE")
C3=S.count("RE")

ans=[C0,C1,C2,C3]
moji=["AC","WA","TLE"," RE"]

for i in range(4):
    print(moji[i]+" x "+str(ans[i]))

Solution (Python):
N = int(input())
S = []
for _ in range(N):
  s = input()
  S.append(s)
kekka = [0,0,0,0]
for s in S:
  if s=='AC':
    kekka[0] += 1
  if s=='WA':
    kekka[1] += 1
  if s=='TLE':
    kekka[2] += 1
  if s=='RE':
    kekka[3] += 1
judge = ['AC','WA','TLE','RE']
for i in range(4):
  print(judge[i],'x',kekka[i])

Solution (Python):
n = int(input())
a=0
w=0
t=0
r=0

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

    if ans == 'AC':
        a+=1
    elif ans == 'WA':
        w+=1
    elif ans == '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=[]
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):
dic={"AC":0, 'WA':0, 'TLE':0, "RE":0}
t = int(input())
for i in range(t):
	dic[input()]+=1
for key,val in dic.items():
	print(key+" x "+str(val))

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

num_lines = int(input())
li = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}


for _ in range(num_lines):
    s = input()
    for key, value in li.items():
      if s.count(key) > 0 :
        li[key] = int(value) + 1

for key, value in li.items():
  print('{} x {}'.format(key, value))

Solution (Python):
from sys import exit





n, = map(int, input().split())

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

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

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

a = [input() for i in range(ru)] 


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

Solution (Python):
n = int(input())
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(f'AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}')

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

for i in range(n):
    s = input()
    for k in judges:
        if k == s:
            judges[k] += 1

for k in judges:
    print(k + ' x ' + str(judges[k]))

Solution (Python):
n=int(input())
ac,wa,tl,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"):
    tl+=1
  else:
    re+=1
print("AC",'x',ac)
print("WA",'x',wa)
print("TLE",'x',tl)
print("RE",'x',re)

Solution (Python):
from collections import OrderedDict
N = int(input())
S = OrderedDict([('AC', 0), ('WA', 0), ('TLE', 0), ('RE', 0)])
for i in range(N):
    text = input()
    if text in S.keys():
        S[text] =S[text] + 1
        

for key, value in S.items():
    print('{} x {}'.format(key, value))

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, acos, asin, atan, sqrt, tan, cos, pi
from operator import mul
from functools import reduce
from pprint import pprint


sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


mod = 10 ** 9 + 7


n = I()
a, t, w, r = 0, 0, 0, 0
for _ in range(n):
    s = S()
    if s[0] == "A":
        a += 1
    elif s[0] == "T":
        t += 1
    elif s[0] == "R":
        r += 1
    else:
        w += 1

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

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

c0 = a.count("AC")
c1 = a.count("WA")
c2 = a.count("TLE")
c3 = a.count("RE")

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

Solution (Python):
b = int(input())
a = [input() for i in range(b)]
ac = a.count('AC')
wa = a.count('WA')
tle = a.count('TLE')
re = a.count('RE')
print ('AC x '+str(ac))
print ('WA x '+str(wa))
print ('TLE x '+str(tle))
print ('RE x '+str(re))

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
import random
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007




def main():
	N = inputInt()

	ans = {}
	ans["AC"] = 0
	ans["WA"] = 0
	ans["TLE"] = 0
	ans["RE"] = 0

	for i in range(N):
		s = inputStr()
		ans[s] += 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"]))



if __name__ == "__main__":
	main()

Solution (Python):
a = int(input())
jud = []
for i in range(a):
	jud.append(input().strip())

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

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

Solution (Python):
n = int(input())
m = [input() for i in range(n)]
 
ans = [0,0,0,0]
 
for i in m:
    if i == "AC":
        ans[0] += 1
    elif i == "WA":
        ans[1] += 1
    elif i == "TLE":
        ans[2] += 1
    elif i == "RE":
        ans[3] += 1
    
    
    
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):
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())
d = {}
li = ['AC', 'WA', 'TLE', 'RE']

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

for i in li:
    if i in d:
        print('{} x {}'.format(i, str(d[i])))
    else:
        print('{} x {}'.format(i, str(0)))

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

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

for i in range(0, N): 
    a = input()
    ans[a] += 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 _ in range(N):
    S.append(input())

A=S.count('AC')
B=S.count('WA')
C=S.count('TLE')
D=S.count('RE')

print('AC x ', A)
print('WA x ', B)
print('TLE x ', C)
print('RE x ', D)

Solution (Python):
N = int(input())
C0 = 0
C1 = 0
C2 = 0
C3 = 0
for i in range(N):
  result = input()
  if result == "AC":
    C0 += 1
  elif result == "WA":
    C1 += 1
  elif result == "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_inputs = int(input())
a = []
for _ in range(n_inputs):
  a.append(input())
    
count = Counter(a)

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

for t in types:
  print(f"{t} x {count[t]}")

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

verdicts = []
ac = 0
wa = 0
tle = 0
re = 0

for _ in range(n):
    t = input()
    verdicts.append(t.upper())
    
for verdict in verdicts:
    if verdict == 'AC':
        ac += 1
    elif verdict == 'WA':
        wa += 1
    elif verdict == 'TLE':
        tle += 1
    elif verdict == 'RE':
        re += 1
        
print(f'AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}')

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

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):
import collections
def II(): return int(input())
N=II()
L=[]
for i in range(N):
  s=input()
  L.append(s)
c=collections.Counter(L)
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 {}".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=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', AC)
print('WA x', WA)
print('TLE x', TLE)
print('RE x', RE)

Solution (Python):
from collections import defaultdict
 
d=defaultdict(int)
 
for i in range(int(input())):
  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())
l=[0,0,0,0]
while(n):
  r=input()
  if(r=="AC"):
    l[0]=l[0]+1
  elif(r=="WA"):
    l[1]=l[1]+1
  elif(r=="TLE"):
    l[2]=l[2]+1
  elif(r=="RE"):
    l[3]=l[3]+1
  n=n-1  
print("AC x {}".format(l[0]))
print("WA x {}".format(l[1]))
print("TLE x {}".format(l[2]))
print("RE x {}".format(l[3]))

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

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

for i in range(n):
    key = input()
    judge[key] += 1

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

Solution (Python):
n = int(input())
x = [0,0,0,0]
y = ["AC","WA","TLE","RE"]
for _ in range(n):
  si = str(input())
  if si == "AC":
    x[0] += 1
  elif si == "WA":
    x[1] += 1
  elif si == "TLE":
    x[2] += 1
  elif si == "RE":
    x[3] += 1
for i in range(4):
  print(y[i],"x",x[i])

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

accnt = 0
wacnt = 0
tlecnt = 0
recnt = 0

for i in range(n):
  query = input()
  if query == 'AC':
    accnt += 1
  elif query == 'WA':
    wacnt +=1
  elif query == 'TLE':
    tlecnt += 1
  else:
    recnt += 1

print('AC x',accnt)
print('WA x',wacnt)
print('TLE x',tlecnt)
print('RE x',recnt)

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

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

for j in verdict:
    opt_dict[j] = opt_dict[j] + 1

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

Solution (Python):
N=int(input())
list=[]
for i in range(N):
  S=input()
  if S:
    list.append(S)
C0=list.count("AC")
C1=list.count("WA")
C2=list.count("TLE")
C3=list.count("RE")
print ("AC x ",C0)
print ("WA x ",C1)
print ("TLE x ",C2)
print ("RE x ",C3)

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

for key,value in ans.items():
    print(key,"x",str(value))

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

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

ac = 0
wa = 0
tle = 0
re = 0
for i in range(count):
  ans = input()
  if ans == "AC":
    ac = ac + 1
  elif ans == "WA":
    wa = wa + 1
  elif ans == "TLE":
    tle = tle + 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):
na=0
nw=0
nt=0
nr=0
i = int(input())
for n in range(i):
    a=input()
    if a=="AC":
        na= na +1
    elif a=="WA":
        nw= nw+1
    elif a=="TLE":
        nt=nt+1
    else:
        nr=nr+1
print('AC x %d'%na)
print('WA x %d'%nw)
print('TLE x %d'%nt)
print('RE x %d'%nr)

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

verdicts = []
ac = 0
wa = 0
tle = 0
re = 0

for _ in range(n):
    a = input()
    verdicts.append(a.upper())
    
for verdict in verdicts:
    if verdict == 'AC':
        ac += 1
    elif verdict == 'WA':
        wa += 1
    elif verdict == 'TLE':
        tle += 1
    elif verdict == 'RE':
        re += 1
        
print(f'AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}')

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

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

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

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

Solution (Python):
import collections
 
judgement = []
while True:
  try:
    judgement.append(input())
  except:
    break
 
counter = collections.Counter(judgement)
 
n_ac = counter.get('AC', 0)
n_wa = counter.get('WA', 0)
n_tle = counter.get('TLE', 0)
n_re = counter.get('RE', 0)
 
print('AC x {}'.format(n_ac))
print('WA x {}'.format(n_wa))
print('TLE x {}'.format(n_tle))
print('RE x {}'.format(n_re))

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

countAC = 0
countWA = 0
countTLE = 0 
countRE = 0

for i in range(N):
    if S[i]=="AC":
        countAC += 1
    elif S[i]=="WA":
        countWA += 1
    elif S[i]=="TLE":
        countTLE += 1
    else:
        countRE += 1

print("AC x ",end='')
print(countAC)
print("WA x ",end='')
print(countWA)
print("TLE x ",end='')
print(countTLE)
print("RE x ",end='') 
print(countRE)

Solution (Python):
from collections import Counter
n = int(input())
s = list(str(input()) for _ in range(n))
C_s = Counter(s)
s_l = ['AC', 'WA', 'TLE', 'RE']
for item in s_l:
    print(item, ' x ', C_s[item])

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

import collections
l = []
for n in range(N):
  S = input()
  l.append(S)

c = collections.Counter(l)


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):
a=int(input())

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

print("AC x {:d}".format(s.count("AC")))
print("WA x {:d}".format(s.count("WA")))
print("TLE x {:d}".format(s.count("TLE")))
print("RE x {:d}".format(s.count("RE")))

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

import collections
l = []
for n in range(N):
  S = input()
  l.append(S)

c = collections.Counter(l)


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



print("AC x %d" % s.count("AC") )
print("WA x %d" % s.count("WA") )
print("TLE x %d" % s.count("TLE") )
print("RE x %d" % s.count("RE") )

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

Solution (Python):
import collections
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())
results = [input() for i in range(N)]

counts = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0,
}
for result in results:
    if result == 'AC':
        counts['AC'] += 1
    elif result == 'WA':
        counts['WA'] += 1
    elif result == 'TLE':
        counts['TLE'] += 1
    elif result == 'RE':
        counts['RE'] += 1
answer = '''
AC x {}
WA x {}
TLE x {}
RE x {}
'''.format(counts['AC'], counts['WA'], counts['TLE'], counts['RE'])
print(answer)

Solution (Python):
size = int(input())
arr = [str(input()) for i in range(size)]
x = arr.count("AC")
y = arr.count("WA")
z = arr.count("TLE")
w = arr.count("RE")
print("AC x ",x)
print("WA x ",y)
print("TLE x ",z)
print("RE x ",w)

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

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
    else:
        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):
dic = {}
dic['AC']=0
dic['WA']=0
dic['TLE']=0
dic['RE']=0
for I in range(int(input())):
    s = input()
    dic[s]+=1

print("AC x %d"%(dic['AC']))
print("WA x %d"%(dic['WA']))
print("TLE x %d"%(dic['TLE']))
print("RE x %d"%(dic['RE']))

Solution (Python):
try:
    N = int(input())
    
    if N>=1 and N<=10**5:
        dic = {'AC':0,'WA':0,'TLE':0,'RE':0}
        
        while N>0:
            
            case = input()
            
            if case in dic:
                dic[case] +=1
            
            N-=1
        for key in dic:
            print(key," x ",dic[key])
        
        
except Exception as e:
    print(e)

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

AC2 = "AC x " + str(AC)
WA2 = "WA x " + str(WA)
TLE2 = "TLE x " + str(TLE)
RE2 = "RE x " + str(RE)

list = [AC2,WA2,TLE2,RE2]
list_n = "\n".join(list)
print(list_n)

Solution (Python):

n = int(input())

s = [input() for _ 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):
n=int(input())
c1=0
c2=0
c3=0
c4=0
s1='AC'
s2='WA'
s3='TLE'
s4='RE'
for _ in range(n):
	str1=str(input())
	if(str1=='AC'):
		c1=c1+1
	elif(str1=='WA'):
		c2=c2+1
	elif(str1=='TLE'):
		c3=c3+1
	elif(str1=='RE'):
		c4=c4+1
s1=s1+' ' + 'x' + ' ' + str(c1)
s2=s2+' ' + 'x' + ' ' + str(c2)
s3=s3+' ' + 'x' + ' ' + str(c3)
s4=s4+' ' + 'x' + ' ' + str(c4)

print(s1)
print(s2)
print(s3)
print(s4)

Solution (Python):
N = int(input())
S = [input() for i in range(N)]
CA= 0
CW= 0
CT=0
CR=0
for i in S:
  if i == "AC":
    CA += 1
  elif i == "WA":
    CW += 1
  elif i == "TLE":
    CT += 1
  elif i == "RE":
    CR += 1
  else:
    pass
  
print("AC x %d" % (CA))
print("WA x %d" % (CW))
print("TLE x %d" % (CT))
print("RE x %d" % (CR))

Solution (Python):
n = int(input())
S=[0]*n
for i in range(n):
  S[i]=input()

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


for i in range(n):
  if S[i]=='AC':
    ac +=1
  elif S[i]=='WA':
    wa +=1
  elif S[i]=='TLE':
    tle +=1
  elif S[i]=='RE':
    re +=1

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

Solution (Python):
import collections

def resolve():
    N = int(input())
    S = [input() for i in range(N)]
    
    S_counter_dict = collections.Counter(S)
    result_list = ["AC", "WA", "TLE", "RE"]
    for result in result_list:
        if result in S_counter_dict.keys():
            print("{result} x {count}"
            .format(result=result, count=S_counter_dict[result]))
        else:
            print("{result} x 0".format(result=result))

resolve()

Solution (Python):
x=int(input())
cac=0
cwa=0
ctle=0
cre=0

for i in range(0,x):
    moji=input()
    if(moji=='AC'):
        cac+=1
    if(moji=='WA'):
        cwa+=1
    if(moji=='TLE'):
        ctle+=1
    if(moji=='RE'):
        cre+=1
print('AC x ',cac)
print('WA x' ,cwa)
print('TLE x ',ctle)
print('RE x' ,cre)

Solution (Python):
N = int(input())
out = ["AC","WA","TLE","RE"]
output = [0]*4

for _ in range(N):
    S = input()
    if S == out[0]:
        output[0] += 1
    elif S == out[1]:
        output[1] += 1
    elif S == out[2]:
        output[2] += 1
    else:
        output[3] += 1

for i in range(4):
    print(out[i],"x",output[i])

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

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


for i in range(A):
  B = input()
  
  if B == "AC":
    AC+=1
  elif B == "WA":
    WA+=1
  elif B == "TLE":
    TLE+=1
  elif B == "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())
out = ["AC","WA","TLE","RE"]
output = [0]*4

for _ in range(N):
    S = input()
    if S == out[0]:
        output[0] += 1
    elif S == out[1]:
        output[1] += 1
    elif S == out[2]:
        output[2] += 1
    else:
        output[3] += 1

print(out[0],"x",output[0])
print(out[1],"x",output[1])
print(out[2],"x",output[2])
print(out[3],"x",output[3],end="")