
import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    }

    static class Solution {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int total = in.nextInt();
            String[] keys = {"AC", "WA", "TLE", "RE"};

            Map<String, Integer> hm = new HashMap<String, Integer>();
            for (int n = 0; n < total; n++) {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            }
            for (String k : keys) {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            }

        }
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String nextLine() {
            String inputLine = "";
            try {
                inputLine = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return inputLine;
        }
    }
}


 import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    }

    static class Solution {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int total = in.nextInt();
            String[] keys = {"AC", "WA", "TLE", "RE"};

            Map<String, Integer> hm = new HashMap<String, Integer>();
            for (int n = 0; n < total; n++) {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            }
            for (String k : keys) {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            }

        }
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String nextLine() {
            String inputLine = "";
            try {
                inputLine = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return inputLine;
        }
    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) Solution solver = new Solution(); solver new Solution() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class Solution {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int total = in.nextInt();
            String[] keys = {"AC", "WA", "TLE", "RE"};

            Map<String, Integer> hm = new HashMap<String, Integer>();
            for (int n = 0; n < total; n++) {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            }
            for (String k : keys) {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            }

        }
    } Solution public void solve(int testNumber, InputReader in, PrintWriter out) {

            int total = in.nextInt();
            String[] keys = {"AC", "WA", "TLE", "RE"};

            Map<String, Integer> hm = new HashMap<String, Integer>();
            for (int n = 0; n < total; n++) {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            }
            for (String k : keys) {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            }

        } solve {

            int total = in.nextInt();
            String[] keys = {"AC", "WA", "TLE", "RE"};

            Map<String, Integer> hm = new HashMap<String, Integer>();
            for (int n = 0; n < total; n++) {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            }
            for (String k : keys) {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            }

        } int total = in.nextInt(); total in.nextInt() in.nextInt in String[] keys = {"AC", "WA", "TLE", "RE"}; keys {"AC", "WA", "TLE", "RE"} "AC" "WA" "TLE" "RE" Map<String, Integer> hm = new HashMap<String, Integer>(); hm new HashMap<String, Integer>() for (int n = 0; n < total; n++) {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            } int n = 0; int n = 0; n 0 n < total n total n++ n++ n {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            } {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            } String s = in.next(); s in.next() in.next in if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                } hm.containsKey(s) hm.containsKey hm s {
                    hm.put(s,  hm.get(s) + 1) ;
                } hm.put(s,  hm.get(s) + 1) hm.put hm s hm.get(s) + 1 hm.get(s) hm.get hm s 1 {
                    hm.put(s, 1);
                } hm.put(s, 1) hm.put hm s 1 for (String k : keys) {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            } String k keys {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            } {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            } if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                } hm.containsKey(k) hm.containsKey hm k {
                    System.out.println(k + " x " + hm.get(k));
                } System.out.println(k + " x " + hm.get(k)) System.out.println System.out System System.out k + " x " + hm.get(k) k + " x " + hm.get(k) k " x " hm.get(k) hm.get hm k {
                    System.out.println(k + " x " + 0);
                } System.out.println(k + " x " + 0) System.out.println System.out System System.out k + " x " + 0 k + " x " + 0 k " x " 0 int testNumber testNumber InputReader in in PrintWriter out out static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String nextLine() {
            String inputLine = "";
            try {
                inputLine = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return inputLine;
        }
    } InputReader private BufferedReader reader; reader private StringTokenizer tokenizer; tokenizer public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        } InputReader {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        } reader = new BufferedReader(new InputStreamReader(stream)) reader new BufferedReader(new InputStreamReader(stream)) tokenizer = null tokenizer null InputStream stream stream public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } next {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    tokenizer = new StringTokenizer(reader.readLine());
                } tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public String nextLine() {
            String inputLine = "";
            try {
                inputLine = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return inputLine;
        } nextLine {
            String inputLine = "";
            try {
                inputLine = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return inputLine;
        } String inputLine = ""; inputLine "" try {
                inputLine = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                inputLine = reader.readLine();
            } inputLine = reader.readLine() inputLine reader.readLine() reader.readLine reader return inputLine; inputLine public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    }

    static class Solution {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int total = in.nextInt();
            String[] keys = {"AC", "WA", "TLE", "RE"};

            Map<String, Integer> hm = new HashMap<String, Integer>();
            for (int n = 0; n < total; n++) {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            }
            for (String k : keys) {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            }

        }
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String nextLine() {
            String inputLine = "";
            try {
                inputLine = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return inputLine;
        }
    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    }

    static class Solution {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int total = in.nextInt();
            String[] keys = {"AC", "WA", "TLE", "RE"};

            Map<String, Integer> hm = new HashMap<String, Integer>();
            for (int n = 0; n < total; n++) {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            }
            for (String k : keys) {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            }

        }
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String nextLine() {
            String inputLine = "";
            try {
                inputLine = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return inputLine;
        }
    }
} Main

import java.io.*;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Solution solver = new Solution();
        solver.solve(1, in, out);
        out.close();
    }

    static class Solution {
        public void solve(int testNumber, InputReader in, PrintWriter out) {

            int total = in.nextInt();
            String[] keys = {"AC", "WA", "TLE", "RE"};

            Map<String, Integer> hm = new HashMap<String, Integer>();
            for (int n = 0; n < total; n++) {
                String s = in.next();
                if (hm.containsKey(s)) {
                    hm.put(s,  hm.get(s) + 1) ;
                }
                else {
                    hm.put(s, 1);
                }

            }
            for (String k : keys) {
                if (hm.containsKey(k)) {
                    System.out.println(k + " x " + hm.get(k));
                }
                else {
                    System.out.println(k + " x " + 0);
                }

            }

        }
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream));
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public String nextLine() {
            String inputLine = "";
            try {
                inputLine = reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return inputLine;
        }
    }
}



