local length = io.read()
local data = {AC = 0, WA = 0, TLE =0, RE = 0}

for i = 1, length do 
    local key = io.read()
    if data[key] then
        data[key] = data[key] + 1
    end
end

for key, num in pairs(data) do 
    print(key.." ".."X".." "..num)
end

