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

 
public class Main {            
    static StringBuilder out=new StringBuilder();
    static FastReader in=new FastReader();
    public static int[] getIntArray(int n){
        int arr[]=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=in.nextInt();
        }
        return arr;
    }
 
    static int  mod=(int)1e9 +7;
    static int [][]dp;
    
    
    public static void solve(){
        int ac=0,wa=0, tle=0,re=0;
        int n=in.nextInt();
        for(int i=0;i<n;i++){
            String s=in.nextLine();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        out.append("AC x "+ac).append('\n');
        out.append("WA x "+wa).append('\n');
        out.append("TLE x "+tle).append('\n');
        out.append("RE x "+re).append('\n');
    }

    public static void main(String args[]){
        int t=1;
        while(t-->0){
            solve();
            out.append('\n');
        }
        System.out.println(out);
    }
}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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;
    }
}

class tree{
    int n, t[];
    public tree(int arr[]){
        n=arr.length;
        t=new int[n*4];
        build(arr, 1,0,n-1);
    }
    public int build(int arr[],int i,int l,int r){
        if(l==r){
            t[i]=arr[l];
            return 1;
        }
        int mid=l+(r-l)/2;
        int h=Math.min(build(arr,i*2,l,mid),build(arr,i*2+1,mid+1,r));
        if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        }
        return ++h;
    }
    public int update(int i, int l,int r, int p,int b){
        if(l==r){
            t[i]=b;
            return 1;
        }
        int mid=l+(r-l)/2;
        int h=0;
        if(p>mid){
            h=update(i*2+1,mid+1,r,p,b);
        }else{
            h=update(i*2,l,mid,p,b);
        }
        if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        }
        return ++h;
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {            
    static StringBuilder out=new StringBuilder();
    static FastReader in=new FastReader();
    public static int[] getIntArray(int n){
        int arr[]=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=in.nextInt();
        }
        return arr;
    }
 
    static int  mod=(int)1e9 +7;
    static int [][]dp;
    
    
    public static void solve(){
        int ac=0,wa=0, tle=0,re=0;
        int n=in.nextInt();
        for(int i=0;i<n;i++){
            String s=in.nextLine();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        out.append("AC x "+ac).append('\n');
        out.append("WA x "+wa).append('\n');
        out.append("TLE x "+tle).append('\n');
        out.append("RE x "+re).append('\n');
    }

    public static void main(String args[]){
        int t=1;
        while(t-->0){
            solve();
            out.append('\n');
        }
        System.out.println(out);
    }
} Main static StringBuilder out=new StringBuilder(); out new StringBuilder() static FastReader in=new FastReader(); in new FastReader() static int  mod=(int)1e9 +7; mod (int)1e9 +7 (int)1e9 7 static int [][]dp; dp public static int[] getIntArray(int n){
        int arr[]=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=in.nextInt();
        }
        return arr;
    } getIntArray {
        int arr[]=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=in.nextInt();
        }
        return arr;
    } int arr[]=new int[n]; arr new int[n] n for(int i=0;i<n;i++){
            arr[i]=in.nextInt();
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            arr[i]=in.nextInt();
        } {
            arr[i]=in.nextInt();
        } arr[i]=in.nextInt() arr[i] arr i in.nextInt() in.nextInt in return arr; arr int n n public static void solve(){
        int ac=0,wa=0, tle=0,re=0;
        int n=in.nextInt();
        for(int i=0;i<n;i++){
            String s=in.nextLine();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        out.append("AC x "+ac).append('\n');
        out.append("WA x "+wa).append('\n');
        out.append("TLE x "+tle).append('\n');
        out.append("RE x "+re).append('\n');
    } solve {
        int ac=0,wa=0, tle=0,re=0;
        int n=in.nextInt();
        for(int i=0;i<n;i++){
            String s=in.nextLine();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        out.append("AC x "+ac).append('\n');
        out.append("WA x "+wa).append('\n');
        out.append("TLE x "+tle).append('\n');
        out.append("RE x "+re).append('\n');
    } int ac=0 ac 0 wa=0 wa 0 tle=0 tle 0 re=0; re 0 int n=in.nextInt(); n in.nextInt() in.nextInt in for(int i=0;i<n;i++){
            String s=in.nextLine();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            String s=in.nextLine();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
        } {
            String s=in.nextLine();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
        } String s=in.nextLine(); s in.nextLine() in.nextLine in if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            } s.equals("AC") s.equals s "AC" {
                ac++;
            } ac++ ac if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            } s.equals("WA") s.equals s "WA" {
                wa++;
            } wa++ wa if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            } s.equals("TLE") s.equals s "TLE" {
                tle++;
            } tle++ tle {
                re++;
            } re++ re out.append("AC x "+ac).append('\n') out.append("AC x "+ac).append out.append("AC x "+ac) out.append out "AC x "+ac "AC x " ac '\n' out.append("WA x "+wa).append('\n') out.append("WA x "+wa).append out.append("WA x "+wa) out.append out "WA x "+wa "WA x " wa '\n' out.append("TLE x "+tle).append('\n') out.append("TLE x "+tle).append out.append("TLE x "+tle) out.append out "TLE x "+tle "TLE x " tle '\n' out.append("RE x "+re).append('\n') out.append("RE x "+re).append out.append("RE x "+re) out.append out "RE x "+re "RE x " re '\n' public static void main(String args[]){
        int t=1;
        while(t-->0){
            solve();
            out.append('\n');
        }
        System.out.println(out);
    } main {
        int t=1;
        while(t-->0){
            solve();
            out.append('\n');
        }
        System.out.println(out);
    } int t=1; t 1 while(t-->0){
            solve();
            out.append('\n');
        } t-->0 t-- t 0 {
            solve();
            out.append('\n');
        } solve() solve out.append('\n') out.append out '\n' System.out.println(out) System.out.println System.out System System.out out String args[] args 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 class tree{
    int n, t[];
    public tree(int arr[]){
        n=arr.length;
        t=new int[n*4];
        build(arr, 1,0,n-1);
    }
    public int build(int arr[],int i,int l,int r){
        if(l==r){
            t[i]=arr[l];
            return 1;
        }
        int mid=l+(r-l)/2;
        int h=Math.min(build(arr,i*2,l,mid),build(arr,i*2+1,mid+1,r));
        if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        }
        return ++h;
    }
    public int update(int i, int l,int r, int p,int b){
        if(l==r){
            t[i]=b;
            return 1;
        }
        int mid=l+(r-l)/2;
        int h=0;
        if(p>mid){
            h=update(i*2+1,mid+1,r,p,b);
        }else{
            h=update(i*2,l,mid,p,b);
        }
        if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        }
        return ++h;
    }
} tree int n n t[]; t public tree(int arr[]){
        n=arr.length;
        t=new int[n*4];
        build(arr, 1,0,n-1);
    } tree {
        n=arr.length;
        t=new int[n*4];
        build(arr, 1,0,n-1);
    } n=arr.length n arr.length arr arr.length t=new int[n*4] t new int[n*4] n*4 n 4 build(arr, 1,0,n-1) build arr 1 0 n-1 n 1 int arr[] arr public int build(int arr[],int i,int l,int r){
        if(l==r){
            t[i]=arr[l];
            return 1;
        }
        int mid=l+(r-l)/2;
        int h=Math.min(build(arr,i*2,l,mid),build(arr,i*2+1,mid+1,r));
        if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        }
        return ++h;
    } build {
        if(l==r){
            t[i]=arr[l];
            return 1;
        }
        int mid=l+(r-l)/2;
        int h=Math.min(build(arr,i*2,l,mid),build(arr,i*2+1,mid+1,r));
        if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        }
        return ++h;
    } if(l==r){
            t[i]=arr[l];
            return 1;
        } l==r l r {
            t[i]=arr[l];
            return 1;
        } t[i]=arr[l] t[i] t i arr[l] arr l return 1; 1 int mid=l+(r-l)/2; mid l+(r-l)/2 l (r-l)/2 (r-l) r l 2 int h=Math.min(build(arr,i*2,l,mid),build(arr,i*2+1,mid+1,r)); h Math.min(build(arr,i*2,l,mid),build(arr,i*2+1,mid+1,r)) Math.min Math build(arr,i*2,l,mid) build arr i*2 i 2 l mid build(arr,i*2+1,mid+1,r) build arr i*2+1 i*2 i 2 1 mid+1 mid 1 r if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        } h%2==0 h%2 h 2 0 {
            t[i]=t[i*2] ^ t[i*2 +1 ];
        } t[i]=t[i*2] ^ t[i*2 +1 ] t[i] t i t[i*2] ^ t[i*2 +1 ] t[i*2] t i*2 i 2 t[i*2 +1 ] t i*2 +1 i*2 i 2 1 {
            t[i]=t[i*2] | t[i*2 + 1];
        } t[i]=t[i*2] | t[i*2 + 1] t[i] t i t[i*2] | t[i*2 + 1] t[i*2] t i*2 i 2 t[i*2 + 1] t i*2 + 1 i*2 i 2 1 return ++h; ++h h int arr[] arr int i i int l l int r r public int update(int i, int l,int r, int p,int b){
        if(l==r){
            t[i]=b;
            return 1;
        }
        int mid=l+(r-l)/2;
        int h=0;
        if(p>mid){
            h=update(i*2+1,mid+1,r,p,b);
        }else{
            h=update(i*2,l,mid,p,b);
        }
        if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        }
        return ++h;
    } update {
        if(l==r){
            t[i]=b;
            return 1;
        }
        int mid=l+(r-l)/2;
        int h=0;
        if(p>mid){
            h=update(i*2+1,mid+1,r,p,b);
        }else{
            h=update(i*2,l,mid,p,b);
        }
        if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        }
        return ++h;
    } if(l==r){
            t[i]=b;
            return 1;
        } l==r l r {
            t[i]=b;
            return 1;
        } t[i]=b t[i] t i b return 1; 1 int mid=l+(r-l)/2; mid l+(r-l)/2 l (r-l)/2 (r-l) r l 2 int h=0; h 0 if(p>mid){
            h=update(i*2+1,mid+1,r,p,b);
        }else{
            h=update(i*2,l,mid,p,b);
        } p>mid p mid {
            h=update(i*2+1,mid+1,r,p,b);
        } h=update(i*2+1,mid+1,r,p,b) h update(i*2+1,mid+1,r,p,b) update i*2+1 i*2 i 2 1 mid+1 mid 1 r p b {
            h=update(i*2,l,mid,p,b);
        } h=update(i*2,l,mid,p,b) h update(i*2,l,mid,p,b) update i*2 i 2 l mid p b if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        } h%2==0 h%2 h 2 0 {
            t[i]=t[i*2] ^ t[i*2 +1 ];
        } t[i]=t[i*2] ^ t[i*2 +1 ] t[i] t i t[i*2] ^ t[i*2 +1 ] t[i*2] t i*2 i 2 t[i*2 +1 ] t i*2 +1 i*2 i 2 1 {
            t[i]=t[i*2] | t[i*2 + 1];
        } t[i]=t[i*2] | t[i*2 + 1] t[i] t i t[i*2] | t[i*2 + 1] t[i*2] t i*2 i 2 t[i*2 + 1] t i*2 + 1 i*2 i 2 1 return ++h; ++h h int i i int l l int r r int p p int b b public class Main {            
    static StringBuilder out=new StringBuilder();
    static FastReader in=new FastReader();
    public static int[] getIntArray(int n){
        int arr[]=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=in.nextInt();
        }
        return arr;
    }
 
    static int  mod=(int)1e9 +7;
    static int [][]dp;
    
    
    public static void solve(){
        int ac=0,wa=0, tle=0,re=0;
        int n=in.nextInt();
        for(int i=0;i<n;i++){
            String s=in.nextLine();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        out.append("AC x "+ac).append('\n');
        out.append("WA x "+wa).append('\n');
        out.append("TLE x "+tle).append('\n');
        out.append("RE x "+re).append('\n');
    }

    public static void main(String args[]){
        int t=1;
        while(t-->0){
            solve();
            out.append('\n');
        }
        System.out.println(out);
    }
} public class Main {            
    static StringBuilder out=new StringBuilder();
    static FastReader in=new FastReader();
    public static int[] getIntArray(int n){
        int arr[]=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=in.nextInt();
        }
        return arr;
    }
 
    static int  mod=(int)1e9 +7;
    static int [][]dp;
    
    
    public static void solve(){
        int ac=0,wa=0, tle=0,re=0;
        int n=in.nextInt();
        for(int i=0;i<n;i++){
            String s=in.nextLine();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        out.append("AC x "+ac).append('\n');
        out.append("WA x "+wa).append('\n');
        out.append("TLE x "+tle).append('\n');
        out.append("RE x "+re).append('\n');
    }

    public static void main(String args[]){
        int t=1;
        while(t-->0){
            solve();
            out.append('\n');
        }
        System.out.println(out);
    }
} Main
import java.io.*;
import java.util.*;

 
public class Main {            
    static StringBuilder out=new StringBuilder();
    static FastReader in=new FastReader();
    public static int[] getIntArray(int n){
        int arr[]=new int[n];
        for(int i=0;i<n;i++){
            arr[i]=in.nextInt();
        }
        return arr;
    }
 
    static int  mod=(int)1e9 +7;
    static int [][]dp;
    
    
    public static void solve(){
        int ac=0,wa=0, tle=0,re=0;
        int n=in.nextInt();
        for(int i=0;i<n;i++){
            String s=in.nextLine();
            if(s.equals("AC")){
                ac++;
            }else if(s.equals("WA")){
                wa++;
            }else if(s.equals("TLE")){
                tle++;
            }else{
                re++;
            }
        }
        out.append("AC x "+ac).append('\n');
        out.append("WA x "+wa).append('\n');
        out.append("TLE x "+tle).append('\n');
        out.append("RE x "+re).append('\n');
    }

    public static void main(String args[]){
        int t=1;
        while(t-->0){
            solve();
            out.append('\n');
        }
        System.out.println(out);
    }
}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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;
    }
}

class tree{
    int n, t[];
    public tree(int arr[]){
        n=arr.length;
        t=new int[n*4];
        build(arr, 1,0,n-1);
    }
    public int build(int arr[],int i,int l,int r){
        if(l==r){
            t[i]=arr[l];
            return 1;
        }
        int mid=l+(r-l)/2;
        int h=Math.min(build(arr,i*2,l,mid),build(arr,i*2+1,mid+1,r));
        if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        }
        return ++h;
    }
    public int update(int i, int l,int r, int p,int b){
        if(l==r){
            t[i]=b;
            return 1;
        }
        int mid=l+(r-l)/2;
        int h=0;
        if(p>mid){
            h=update(i*2+1,mid+1,r,p,b);
        }else{
            h=update(i*2,l,mid,p,b);
        }
        if(h%2==0){
            t[i]=t[i*2] ^ t[i*2 +1 ];
        }else{
            t[i]=t[i*2] | t[i*2 + 1];
        }
        return ++h;
    }
}