
import java.io.*;

import java.lang.annotation.Native;
import java.math.BigInteger;
import java.util.*;

import java.util.ArrayList;

import java.util.Scanner;


public class Main {

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static final int mod = 1000000007;
    static final int mod1 = 1073741824;

    public static int gcd(int a, int b) {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

    static boolean prime[] = new boolean[1000001];
    public static void merge(long arr[][], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[][] = new long[n1][2];
        long R[][] = new long[n2][2];

        /*Copy data to temp arrays*/
        for (int i = 0; i < n1; ++i)
        {
            L[i][0] = arr[l + i][0];
            L[i][1] = arr[l + i][1];


        }

        for (int j = 0; j < n2; ++j) {
            R[j][0] = arr[m + 1 + j][0];
            R[j][1] = arr[m + 1 + j][1];
        }

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2) {
            if (L[i][0] <= R[j][0]) {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            }
            else {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1) {
            arr[k][0] = L[i][0];
            arr[k][1] = L[i][1];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2) {
            arr[k][0] = R[j][0];
            arr[k][1] = R[j][1];

            j++;
            k++;
        }
    }

    public static long[][] sort2elementarray(long arr[][], int l, int r)
    {
        if (l < r) {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort2elementarray(arr, l, m);
            sort2elementarray(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
        return arr;
    }


    static int f=1;
    static int vertices=0;
    static int edges=0;
    public static void dfs(ArrayList<Integer>[]li,int v,HashMap<Integer,Integer>hm)
    {
        hm.put(v,1);

        //System.out.print(v+" ");
        //System.out.println(a[v]+" "+cost);


            vertices++;
            edges+=li[v].size();
            for (int j = 0; j < li[v].size(); j++)
            {

                if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                }
            }
        }




    public static void dfsutil(ArrayList<Integer>[]li,int n,int v)
    {
        HashMap<Integer,Integer>hm=new HashMap<>();
        int c=0;

        for(int j=1;j<=n;j++)
        {

            if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            }
        }
            System.out.println("YES");


    }
    public static void bipartite(ArrayList<Integer>[]li,int n) {
        int f = 1;
        int col[] = new int[n + 1];
        int fl = 1;
        Arrays.fill(col, -1);
        for (int i = 1; i <= n; i++) {
            if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            }

        }
        /*if(fl==0)
          //  System.out.println(-1);
        //else
        {*/

        long l1 = 0;
        long l2 = 0;
        for (int j = 1; j <= n; j++) {
            if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            }
        }
        long ans=(l1*l2)-(n-1);
        System.out.println(ans);
    //}

    }



    public static void main(String[] args) {
        FastReader sc = new FastReader();
        int n=sc.nextInt();
        String ac="AC";
        long a=0;
        String tle="TLE";
        long t=0;
        String wa="WA";
        long w=0;
        String re="RE";
        long r=0;
        for(int j=0;j<n;j++)
        {
            String s=sc.nextLine();
            if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++;
        }
        System.out.println(ac+ " "+"x"+" "+a);
        System.out.println(wa+ " "+"x"+" "+w);
        System.out.println(tle+ " "+"x"+" "+t);
        System.out.println(re+ " "+"x"+" "+r);



    }
}

















 import java.io.*; io.* java import java.lang.annotation.Native; Native java.lang.annotation import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static final int mod = 1000000007;
    static final int mod1 = 1073741824;

    public static int gcd(int a, int b) {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

    static boolean prime[] = new boolean[1000001];
    public static void merge(long arr[][], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[][] = new long[n1][2];
        long R[][] = new long[n2][2];

        /*Copy data to temp arrays*/
        for (int i = 0; i < n1; ++i)
        {
            L[i][0] = arr[l + i][0];
            L[i][1] = arr[l + i][1];


        }

        for (int j = 0; j < n2; ++j) {
            R[j][0] = arr[m + 1 + j][0];
            R[j][1] = arr[m + 1 + j][1];
        }

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2) {
            if (L[i][0] <= R[j][0]) {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            }
            else {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1) {
            arr[k][0] = L[i][0];
            arr[k][1] = L[i][1];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2) {
            arr[k][0] = R[j][0];
            arr[k][1] = R[j][1];

            j++;
            k++;
        }
    }

    public static long[][] sort2elementarray(long arr[][], int l, int r)
    {
        if (l < r) {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort2elementarray(arr, l, m);
            sort2elementarray(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
        return arr;
    }


    static int f=1;
    static int vertices=0;
    static int edges=0;
    public static void dfs(ArrayList<Integer>[]li,int v,HashMap<Integer,Integer>hm)
    {
        hm.put(v,1);

        //System.out.print(v+" ");
        //System.out.println(a[v]+" "+cost);


            vertices++;
            edges+=li[v].size();
            for (int j = 0; j < li[v].size(); j++)
            {

                if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                }
            }
        }




    public static void dfsutil(ArrayList<Integer>[]li,int n,int v)
    {
        HashMap<Integer,Integer>hm=new HashMap<>();
        int c=0;

        for(int j=1;j<=n;j++)
        {

            if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            }
        }
            System.out.println("YES");


    }
    public static void bipartite(ArrayList<Integer>[]li,int n) {
        int f = 1;
        int col[] = new int[n + 1];
        int fl = 1;
        Arrays.fill(col, -1);
        for (int i = 1; i <= n; i++) {
            if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            }

        }
        /*if(fl==0)
          //  System.out.println(-1);
        //else
        {*/

        long l1 = 0;
        long l2 = 0;
        for (int j = 1; j <= n; j++) {
            if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            }
        }
        long ans=(l1*l2)-(n-1);
        System.out.println(ans);
    //}

    }



    public static void main(String[] args) {
        FastReader sc = new FastReader();
        int n=sc.nextInt();
        String ac="AC";
        long a=0;
        String tle="TLE";
        long t=0;
        String wa="WA";
        long w=0;
        String re="RE";
        long r=0;
        for(int j=0;j<n;j++)
        {
            String s=sc.nextLine();
            if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++;
        }
        System.out.println(ac+ " "+"x"+" "+a);
        System.out.println(wa+ " "+"x"+" "+w);
        System.out.println(tle+ " "+"x"+" "+t);
        System.out.println(re+ " "+"x"+" "+r);



    }
} Main static final int mod = 1000000007; mod 1000000007 static final int mod1 = 1073741824; mod1 1073741824 static boolean prime[] = new boolean[1000001]; prime new boolean[1000001] 1000001 static int f=1; f 1 static int vertices=0; vertices 0 static int edges=0; edges 0 public static int gcd(int a, int b) {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    } gcd {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    } if (a == 0)
            return b; a == 0 a 0 return b; b return gcd(b % a, a); gcd(b % a, a) gcd b % a b a a int a a int b b public static void merge(long arr[][], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[][] = new long[n1][2];
        long R[][] = new long[n2][2];

        /*Copy data to temp arrays*/
        for (int i = 0; i < n1; ++i)
        {
            L[i][0] = arr[l + i][0];
            L[i][1] = arr[l + i][1];


        }

        for (int j = 0; j < n2; ++j) {
            R[j][0] = arr[m + 1 + j][0];
            R[j][1] = arr[m + 1 + j][1];
        }

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2) {
            if (L[i][0] <= R[j][0]) {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            }
            else {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1) {
            arr[k][0] = L[i][0];
            arr[k][1] = L[i][1];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2) {
            arr[k][0] = R[j][0];
            arr[k][1] = R[j][1];

            j++;
            k++;
        }
    } merge {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[][] = new long[n1][2];
        long R[][] = new long[n2][2];

        /*Copy data to temp arrays*/
        for (int i = 0; i < n1; ++i)
        {
            L[i][0] = arr[l + i][0];
            L[i][1] = arr[l + i][1];


        }

        for (int j = 0; j < n2; ++j) {
            R[j][0] = arr[m + 1 + j][0];
            R[j][1] = arr[m + 1 + j][1];
        }

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2) {
            if (L[i][0] <= R[j][0]) {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            }
            else {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1) {
            arr[k][0] = L[i][0];
            arr[k][1] = L[i][1];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2) {
            arr[k][0] = R[j][0];
            arr[k][1] = R[j][1];

            j++;
            k++;
        }
    } int n1 = m - l + 1; n1 m - l + 1 m - l m l 1 int n2 = r - m; n2 r - m r m long L[][] = new long[n1][2]; L new long[n1][2] n1 2 long R[][] = new long[n2][2]; R new long[n2][2] n2 2 for (int i = 0; i < n1; ++i)
        {
            L[i][0] = arr[l + i][0];
            L[i][1] = arr[l + i][1];


        } int i = 0; int i = 0; i 0 i < n1 i n1 ++i ++i i {
            L[i][0] = arr[l + i][0];
            L[i][1] = arr[l + i][1];


        } {
            L[i][0] = arr[l + i][0];
            L[i][1] = arr[l + i][1];


        } L[i][0] = arr[l + i][0] L[i][0] L[i] L i 0 arr[l + i][0] arr[l + i] arr l + i l i 0 L[i][1] = arr[l + i][1] L[i][1] L[i] L i 1 arr[l + i][1] arr[l + i] arr l + i l i 1 for (int j = 0; j < n2; ++j) {
            R[j][0] = arr[m + 1 + j][0];
            R[j][1] = arr[m + 1 + j][1];
        } int j = 0; int j = 0; j 0 j < n2 j n2 ++j ++j j {
            R[j][0] = arr[m + 1 + j][0];
            R[j][1] = arr[m + 1 + j][1];
        } {
            R[j][0] = arr[m + 1 + j][0];
            R[j][1] = arr[m + 1 + j][1];
        } R[j][0] = arr[m + 1 + j][0] R[j][0] R[j] R j 0 arr[m + 1 + j][0] arr[m + 1 + j] arr m + 1 + j m + 1 + j m 1 j 0 R[j][1] = arr[m + 1 + j][1] R[j][1] R[j] R j 1 arr[m + 1 + j][1] arr[m + 1 + j] arr m + 1 + j m + 1 + j m 1 j 1 int i = 0 i 0 j = 0; j 0 int k = l; k l while (i < n1 && j < n2) {
            if (L[i][0] <= R[j][0]) {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            }
            else {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            }
            k++;
        } i < n1 && j < n2 i < n1 i n1 j < n2 j n2 {
            if (L[i][0] <= R[j][0]) {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            }
            else {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            }
            k++;
        } if (L[i][0] <= R[j][0]) {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            }
            else {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            } L[i][0] <= R[j][0] L[i][0] L[i] L i 0 R[j][0] R[j] R j 0 {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            } arr[k][0] = L[i][0] arr[k][0] arr[k] arr k 0 L[i][0] L[i] L i 0 arr[k][1] = L[i][1] arr[k][1] arr[k] arr k 1 L[i][1] L[i] L i 1 i++ i {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            } arr[k][0] = R[j][0] arr[k][0] arr[k] arr k 0 R[j][0] R[j] R j 0 arr[k][1] = R[j][1] arr[k][1] arr[k] arr k 1 R[j][1] R[j] R j 1 j++ j k++ k while (i < n1) {
            arr[k][0] = L[i][0];
            arr[k][1] = L[i][1];
            i++;
            k++;
        } i < n1 i n1 {
            arr[k][0] = L[i][0];
            arr[k][1] = L[i][1];
            i++;
            k++;
        } arr[k][0] = L[i][0] arr[k][0] arr[k] arr k 0 L[i][0] L[i] L i 0 arr[k][1] = L[i][1] arr[k][1] arr[k] arr k 1 L[i][1] L[i] L i 1 i++ i k++ k while (j < n2) {
            arr[k][0] = R[j][0];
            arr[k][1] = R[j][1];

            j++;
            k++;
        } j < n2 j n2 {
            arr[k][0] = R[j][0];
            arr[k][1] = R[j][1];

            j++;
            k++;
        } arr[k][0] = R[j][0] arr[k][0] arr[k] arr k 0 R[j][0] R[j] R j 0 arr[k][1] = R[j][1] arr[k][1] arr[k] arr k 1 R[j][1] R[j] R j 1 j++ j k++ k long arr[][] arr int l l int m m int r r public static long[][] sort2elementarray(long arr[][], int l, int r)
    {
        if (l < r) {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort2elementarray(arr, l, m);
            sort2elementarray(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
        return arr;
    } sort2elementarray {
        if (l < r) {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort2elementarray(arr, l, m);
            sort2elementarray(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
        return arr;
    } if (l < r) {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort2elementarray(arr, l, m);
            sort2elementarray(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        } l < r l r {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort2elementarray(arr, l, m);
            sort2elementarray(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        } int m = (l + r) / 2; m (l + r) / 2 (l + r) l r 2 sort2elementarray(arr, l, m) sort2elementarray arr l m sort2elementarray(arr, m + 1, r) sort2elementarray arr m + 1 m 1 r merge(arr, l, m, r) merge arr l m r return arr; arr long arr[][] arr int l l int r r public static void dfs(ArrayList<Integer>[]li,int v,HashMap<Integer,Integer>hm)
    {
        hm.put(v,1);

        //System.out.print(v+" ");
        //System.out.println(a[v]+" "+cost);


            vertices++;
            edges+=li[v].size();
            for (int j = 0; j < li[v].size(); j++)
            {

                if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                }
            }
        } dfs {
        hm.put(v,1);

        //System.out.print(v+" ");
        //System.out.println(a[v]+" "+cost);


            vertices++;
            edges+=li[v].size();
            for (int j = 0; j < li[v].size(); j++)
            {

                if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                }
            }
        } hm.put(v,1) hm.put hm v 1 vertices++ vertices edges+=li[v].size() edges li[v].size() li[v].size li[v] li v for (int j = 0; j < li[v].size(); j++)
            {

                if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                }
            } int j = 0; int j = 0; j 0 j < li[v].size() j li[v].size() li[v].size li[v] li v j++ j++ j {

                if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                }
            } {

                if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                }
            } if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                } hm.get(li[v].get(j)) == null hm.get(li[v].get(j)) hm.get hm li[v].get(j) li[v].get li[v] li v j null {

                    dfs(li, li[v].get(j), hm);

                } dfs(li, li[v].get(j), hm) dfs li li[v].get(j) li[v].get li[v] li v j hm ArrayList<Integer>[]li li int v v HashMap<Integer,Integer>hm hm public static void dfsutil(ArrayList<Integer>[]li,int n,int v)
    {
        HashMap<Integer,Integer>hm=new HashMap<>();
        int c=0;

        for(int j=1;j<=n;j++)
        {

            if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            }
        }
            System.out.println("YES");


    } dfsutil {
        HashMap<Integer,Integer>hm=new HashMap<>();
        int c=0;

        for(int j=1;j<=n;j++)
        {

            if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            }
        }
            System.out.println("YES");


    } HashMap<Integer,Integer>hm=new HashMap<>(); hm new HashMap<>() int c=0; c 0 for(int j=1;j<=n;j++)
        {

            if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            }
        } int j=1; int j=1; j 1 j<=n j n j++ j++ j {

            if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            }
        } {

            if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            }
        } if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            } hm.get(j)==null hm.get(j) hm.get hm j null {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            } vertices=0 vertices 0 edges=0 edges 0 dfs(li,j,hm) dfs li j hm if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                } edges!=vertices*(vertices-1) edges vertices*(vertices-1) vertices (vertices-1) vertices 1 {
                    System.out.println("NO");
                    System.exit(0);
                } System.out.println("NO") System.out.println System.out System System.out "NO" System.exit(0) System.exit System 0 System.out.println("YES") System.out.println System.out System System.out "YES" ArrayList<Integer>[]li li int n n int v v public static void bipartite(ArrayList<Integer>[]li,int n) {
        int f = 1;
        int col[] = new int[n + 1];
        int fl = 1;
        Arrays.fill(col, -1);
        for (int i = 1; i <= n; i++) {
            if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            }

        }
        /*if(fl==0)
          //  System.out.println(-1);
        //else
        {*/

        long l1 = 0;
        long l2 = 0;
        for (int j = 1; j <= n; j++) {
            if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            }
        }
        long ans=(l1*l2)-(n-1);
        System.out.println(ans);
    //}

    } bipartite {
        int f = 1;
        int col[] = new int[n + 1];
        int fl = 1;
        Arrays.fill(col, -1);
        for (int i = 1; i <= n; i++) {
            if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            }

        }
        /*if(fl==0)
          //  System.out.println(-1);
        //else
        {*/

        long l1 = 0;
        long l2 = 0;
        for (int j = 1; j <= n; j++) {
            if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            }
        }
        long ans=(l1*l2)-(n-1);
        System.out.println(ans);
    //}

    } int f = 1; f 1 int col[] = new int[n + 1]; col new int[n + 1] n + 1 n 1 int fl = 1; fl 1 Arrays.fill(col, -1) Arrays.fill Arrays col -1 1 for (int i = 1; i <= n; i++) {
            if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            }

        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            }

        } {
            if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            }

        } if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            } col[i] == -1 col[i] col i -1 1 {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            } col[i] = 1 col[i] col i 1 Queue<Integer> q = new LinkedList<>(); q new LinkedList<>() q.add(i) q.add q i while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                } !q.isEmpty() q.isEmpty() q.isEmpty q {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                } int x = q.peek(); x q.peek() q.peek q q.remove() q.remove q for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    } int j = 0; int j = 0; j 0 j < li[x].size() j li[x].size() li[x].size li[x] li x j++ j++ j {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    } {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    } if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        } col[li[x].get(j)] == -1 col[li[x].get(j)] col li[x].get(j) li[x].get li[x] li x j -1 1 {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } col[li[x].get(j)] = 1 - col[x] col[li[x].get(j)] col li[x].get(j) li[x].get li[x] li x j 1 - col[x] 1 col[x] col x q.add(li[x].get(j)) q.add q li[x].get(j) li[x].get li[x] li x j if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        } col[li[x].get(j)] == col[x] col[li[x].get(j)] col li[x].get(j) li[x].get li[x] li x j col[x] col x {
                            f = 0;
                            break;
                        } f = 0 f 0 break; if (f == 0) {
                    fl = 0;
                    break;
                } f == 0 f 0 {
                    fl = 0;
                    break;
                } fl = 0 fl 0 break; long l1 = 0; l1 0 long l2 = 0; l2 0 for (int j = 1; j <= n; j++) {
            if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            }
        } int j = 1; int j = 1; j 1 j <= n j n j++ j++ j {
            if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            }
        } {
            if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            }
        } if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            } col[j] == 1 col[j] col j 1 {
                l1++;
                //sb.append(j+" ");
            } l1++ l1 {
                l2++;
                //sb1.append(j+" ");
            } l2++ l2 long ans=(l1*l2)-(n-1); ans (l1*l2)-(n-1) (l1*l2) l1 l2 (n-1) n 1 System.out.println(ans) System.out.println System.out System System.out ans ArrayList<Integer>[]li li int n n public static void main(String[] args) {
        FastReader sc = new FastReader();
        int n=sc.nextInt();
        String ac="AC";
        long a=0;
        String tle="TLE";
        long t=0;
        String wa="WA";
        long w=0;
        String re="RE";
        long r=0;
        for(int j=0;j<n;j++)
        {
            String s=sc.nextLine();
            if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++;
        }
        System.out.println(ac+ " "+"x"+" "+a);
        System.out.println(wa+ " "+"x"+" "+w);
        System.out.println(tle+ " "+"x"+" "+t);
        System.out.println(re+ " "+"x"+" "+r);



    } main {
        FastReader sc = new FastReader();
        int n=sc.nextInt();
        String ac="AC";
        long a=0;
        String tle="TLE";
        long t=0;
        String wa="WA";
        long w=0;
        String re="RE";
        long r=0;
        for(int j=0;j<n;j++)
        {
            String s=sc.nextLine();
            if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++;
        }
        System.out.println(ac+ " "+"x"+" "+a);
        System.out.println(wa+ " "+"x"+" "+w);
        System.out.println(tle+ " "+"x"+" "+t);
        System.out.println(re+ " "+"x"+" "+r);



    } FastReader sc = new FastReader(); sc new FastReader() int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc String ac="AC"; ac "AC" long a=0; a 0 String tle="TLE"; tle "TLE" long t=0; t 0 String wa="WA"; wa "WA" long w=0; w 0 String re="RE"; re "RE" long r=0; r 0 for(int j=0;j<n;j++)
        {
            String s=sc.nextLine();
            if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++;
        } int j=0; int j=0; j 0 j<n j n j++ j++ j {
            String s=sc.nextLine();
            if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++;
        } {
            String s=sc.nextLine();
            if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++;
        } String s=sc.nextLine(); s sc.nextLine() sc.nextLine sc if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++; s.compareTo(ac)==0 s.compareTo(ac) s.compareTo s ac 0 a++ a if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++; s.compareTo(tle)==0 s.compareTo(tle) s.compareTo s tle 0 t++ t if(s.compareTo(wa)==0)
                w++;
            else
                r++; s.compareTo(wa)==0 s.compareTo(wa) s.compareTo s wa 0 w++ w r++ r System.out.println(ac+ " "+"x"+" "+a) System.out.println System.out System System.out ac+ " "+"x"+" "+a " " "x" ac+ " "+"x"+" "+a ac " " "x" " " a System.out.println(wa+ " "+"x"+" "+w) System.out.println System.out System System.out wa+ " "+"x"+" "+w " " "x" wa+ " "+"x"+" "+w wa " " "x" " " w System.out.println(tle+ " "+"x"+" "+t) System.out.println System.out System System.out tle+ " "+"x"+" "+t " " "x" tle+ " "+"x"+" "+t tle " " "x" " " t System.out.println(re+ " "+"x"+" "+r) System.out.println System.out System System.out re+ " "+"x"+" "+r " " "x" re+ " "+"x"+" "+r re " " "x" " " r String[] args args static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    } FastReader BufferedReader br; br StringTokenizer st; st public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        } FastReader {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        } br = new BufferedReader(new
                    InputStreamReader(System.in)) br new BufferedReader(new
                    InputStreamReader(System.in)) String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            } try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                } catch (IOException e) {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } nextLine {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        } String str = ""; str "" try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = br.readLine();
            } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static final int mod = 1000000007;
    static final int mod1 = 1073741824;

    public static int gcd(int a, int b) {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

    static boolean prime[] = new boolean[1000001];
    public static void merge(long arr[][], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[][] = new long[n1][2];
        long R[][] = new long[n2][2];

        /*Copy data to temp arrays*/
        for (int i = 0; i < n1; ++i)
        {
            L[i][0] = arr[l + i][0];
            L[i][1] = arr[l + i][1];


        }

        for (int j = 0; j < n2; ++j) {
            R[j][0] = arr[m + 1 + j][0];
            R[j][1] = arr[m + 1 + j][1];
        }

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2) {
            if (L[i][0] <= R[j][0]) {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            }
            else {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1) {
            arr[k][0] = L[i][0];
            arr[k][1] = L[i][1];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2) {
            arr[k][0] = R[j][0];
            arr[k][1] = R[j][1];

            j++;
            k++;
        }
    }

    public static long[][] sort2elementarray(long arr[][], int l, int r)
    {
        if (l < r) {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort2elementarray(arr, l, m);
            sort2elementarray(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
        return arr;
    }


    static int f=1;
    static int vertices=0;
    static int edges=0;
    public static void dfs(ArrayList<Integer>[]li,int v,HashMap<Integer,Integer>hm)
    {
        hm.put(v,1);

        //System.out.print(v+" ");
        //System.out.println(a[v]+" "+cost);


            vertices++;
            edges+=li[v].size();
            for (int j = 0; j < li[v].size(); j++)
            {

                if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                }
            }
        }




    public static void dfsutil(ArrayList<Integer>[]li,int n,int v)
    {
        HashMap<Integer,Integer>hm=new HashMap<>();
        int c=0;

        for(int j=1;j<=n;j++)
        {

            if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            }
        }
            System.out.println("YES");


    }
    public static void bipartite(ArrayList<Integer>[]li,int n) {
        int f = 1;
        int col[] = new int[n + 1];
        int fl = 1;
        Arrays.fill(col, -1);
        for (int i = 1; i <= n; i++) {
            if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            }

        }
        /*if(fl==0)
          //  System.out.println(-1);
        //else
        {*/

        long l1 = 0;
        long l2 = 0;
        for (int j = 1; j <= n; j++) {
            if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            }
        }
        long ans=(l1*l2)-(n-1);
        System.out.println(ans);
    //}

    }



    public static void main(String[] args) {
        FastReader sc = new FastReader();
        int n=sc.nextInt();
        String ac="AC";
        long a=0;
        String tle="TLE";
        long t=0;
        String wa="WA";
        long w=0;
        String re="RE";
        long r=0;
        for(int j=0;j<n;j++)
        {
            String s=sc.nextLine();
            if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++;
        }
        System.out.println(ac+ " "+"x"+" "+a);
        System.out.println(wa+ " "+"x"+" "+w);
        System.out.println(tle+ " "+"x"+" "+t);
        System.out.println(re+ " "+"x"+" "+r);



    }
} public class Main {

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static final int mod = 1000000007;
    static final int mod1 = 1073741824;

    public static int gcd(int a, int b) {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

    static boolean prime[] = new boolean[1000001];
    public static void merge(long arr[][], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[][] = new long[n1][2];
        long R[][] = new long[n2][2];

        /*Copy data to temp arrays*/
        for (int i = 0; i < n1; ++i)
        {
            L[i][0] = arr[l + i][0];
            L[i][1] = arr[l + i][1];


        }

        for (int j = 0; j < n2; ++j) {
            R[j][0] = arr[m + 1 + j][0];
            R[j][1] = arr[m + 1 + j][1];
        }

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2) {
            if (L[i][0] <= R[j][0]) {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            }
            else {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1) {
            arr[k][0] = L[i][0];
            arr[k][1] = L[i][1];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2) {
            arr[k][0] = R[j][0];
            arr[k][1] = R[j][1];

            j++;
            k++;
        }
    }

    public static long[][] sort2elementarray(long arr[][], int l, int r)
    {
        if (l < r) {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort2elementarray(arr, l, m);
            sort2elementarray(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
        return arr;
    }


    static int f=1;
    static int vertices=0;
    static int edges=0;
    public static void dfs(ArrayList<Integer>[]li,int v,HashMap<Integer,Integer>hm)
    {
        hm.put(v,1);

        //System.out.print(v+" ");
        //System.out.println(a[v]+" "+cost);


            vertices++;
            edges+=li[v].size();
            for (int j = 0; j < li[v].size(); j++)
            {

                if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                }
            }
        }




    public static void dfsutil(ArrayList<Integer>[]li,int n,int v)
    {
        HashMap<Integer,Integer>hm=new HashMap<>();
        int c=0;

        for(int j=1;j<=n;j++)
        {

            if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            }
        }
            System.out.println("YES");


    }
    public static void bipartite(ArrayList<Integer>[]li,int n) {
        int f = 1;
        int col[] = new int[n + 1];
        int fl = 1;
        Arrays.fill(col, -1);
        for (int i = 1; i <= n; i++) {
            if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            }

        }
        /*if(fl==0)
          //  System.out.println(-1);
        //else
        {*/

        long l1 = 0;
        long l2 = 0;
        for (int j = 1; j <= n; j++) {
            if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            }
        }
        long ans=(l1*l2)-(n-1);
        System.out.println(ans);
    //}

    }



    public static void main(String[] args) {
        FastReader sc = new FastReader();
        int n=sc.nextInt();
        String ac="AC";
        long a=0;
        String tle="TLE";
        long t=0;
        String wa="WA";
        long w=0;
        String re="RE";
        long r=0;
        for(int j=0;j<n;j++)
        {
            String s=sc.nextLine();
            if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++;
        }
        System.out.println(ac+ " "+"x"+" "+a);
        System.out.println(wa+ " "+"x"+" "+w);
        System.out.println(tle+ " "+"x"+" "+t);
        System.out.println(re+ " "+"x"+" "+r);



    }
} Main

import java.io.*;

import java.lang.annotation.Native;
import java.math.BigInteger;
import java.util.*;

import java.util.ArrayList;

import java.util.Scanner;


public class Main {

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }

    static final int mod = 1000000007;
    static final int mod1 = 1073741824;

    public static int gcd(int a, int b) {
        if (a == 0)
            return b;
        return gcd(b % a, a);
    }

    static boolean prime[] = new boolean[1000001];
    public static void merge(long arr[][], int l, int m, int r)
    {
        // Find sizes of two subarrays to be merged
        int n1 = m - l + 1;
        int n2 = r - m;

        /* Create temp arrays */
        long L[][] = new long[n1][2];
        long R[][] = new long[n2][2];

        /*Copy data to temp arrays*/
        for (int i = 0; i < n1; ++i)
        {
            L[i][0] = arr[l + i][0];
            L[i][1] = arr[l + i][1];


        }

        for (int j = 0; j < n2; ++j) {
            R[j][0] = arr[m + 1 + j][0];
            R[j][1] = arr[m + 1 + j][1];
        }

        /* Merge the temp arrays */

        // Initial indexes of first and second subarrays
        int i = 0, j = 0;

        // Initial index of merged subarry array
        int k = l;
        while (i < n1 && j < n2) {
            if (L[i][0] <= R[j][0]) {
                arr[k][0] = L[i][0];
                arr[k][1] = L[i][1];

                i++;
            }
            else {
                arr[k][0] = R[j][0];
                arr[k][1] = R[j][1];
                j++;
            }
            k++;
        }

        /* Copy remaining elements of L[] if any */
        while (i < n1) {
            arr[k][0] = L[i][0];
            arr[k][1] = L[i][1];
            i++;
            k++;
        }

        /* Copy remaining elements of R[] if any */
        while (j < n2) {
            arr[k][0] = R[j][0];
            arr[k][1] = R[j][1];

            j++;
            k++;
        }
    }

    public static long[][] sort2elementarray(long arr[][], int l, int r)
    {
        if (l < r) {
            // Find the middle point
            int m = (l + r) / 2;

            // Sort first and second halves
            sort2elementarray(arr, l, m);
            sort2elementarray(arr, m + 1, r);

            // Merge the sorted halves
            merge(arr, l, m, r);
        }
        return arr;
    }


    static int f=1;
    static int vertices=0;
    static int edges=0;
    public static void dfs(ArrayList<Integer>[]li,int v,HashMap<Integer,Integer>hm)
    {
        hm.put(v,1);

        //System.out.print(v+" ");
        //System.out.println(a[v]+" "+cost);


            vertices++;
            edges+=li[v].size();
            for (int j = 0; j < li[v].size(); j++)
            {

                if (hm.get(li[v].get(j)) == null)
                {

                    dfs(li, li[v].get(j), hm);

                }
            }
        }




    public static void dfsutil(ArrayList<Integer>[]li,int n,int v)
    {
        HashMap<Integer,Integer>hm=new HashMap<>();
        int c=0;

        for(int j=1;j<=n;j++)
        {

            if(hm.get(j)==null)
            {
                vertices=0;
                edges=0;
                dfs(li,j,hm);
                if(edges!=vertices*(vertices-1)) {
                    System.out.println("NO");
                    System.exit(0);
                }
            }
        }
            System.out.println("YES");


    }
    public static void bipartite(ArrayList<Integer>[]li,int n) {
        int f = 1;
        int col[] = new int[n + 1];
        int fl = 1;
        Arrays.fill(col, -1);
        for (int i = 1; i <= n; i++) {
            if (col[i] == -1) {
                col[i] = 1;
                Queue<Integer> q = new LinkedList<>();
                q.add(i);
                while (!q.isEmpty()) {
                    int x = q.peek();
                    q.remove();
                    for (int j = 0; j < li[x].size(); j++) {
                        if (col[li[x].get(j)] == -1) {
                            col[li[x].get(j)] = 1 - col[x];
                            q.add(li[x].get(j));
                        } else if (col[li[x].get(j)] == col[x]) {
                            f = 0;
                            break;
                        }

                    }

                }
                if (f == 0) {
                    fl = 0;
                    break;
                }


            }

        }
        /*if(fl==0)
          //  System.out.println(-1);
        //else
        {*/

        long l1 = 0;
        long l2 = 0;
        for (int j = 1; j <= n; j++) {
            if (col[j] == 1) {
                l1++;
                //sb.append(j+" ");
            } else {
                l2++;
                //sb1.append(j+" ");
            }
        }
        long ans=(l1*l2)-(n-1);
        System.out.println(ans);
    //}

    }



    public static void main(String[] args) {
        FastReader sc = new FastReader();
        int n=sc.nextInt();
        String ac="AC";
        long a=0;
        String tle="TLE";
        long t=0;
        String wa="WA";
        long w=0;
        String re="RE";
        long r=0;
        for(int j=0;j<n;j++)
        {
            String s=sc.nextLine();
            if(s.compareTo(ac)==0)
                a++;
            else if(s.compareTo(tle)==0)
                t++;
            else if(s.compareTo(wa)==0)
                w++;
            else
                r++;
        }
        System.out.println(ac+ " "+"x"+" "+a);
        System.out.println(wa+ " "+"x"+" "+w);
        System.out.println(tle+ " "+"x"+" "+t);
        System.out.println(re+ " "+"x"+" "+r);



    }
}


















