import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Input in = new Input(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		BJudgeStatusSummary solver = new BJudgeStatusSummary();
		solver.solve(1, in, out);
		out.close();
	}
	static class BJudgeStatusSummary {
		public void solve(int testNumber, Input in, PrintWriter out) {
			int n = in.nextInt();
			int[] arr = new int[4];
			for(int i = 0; i<n; i++) {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			}
			out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", arr[0], arr[1], arr[2], arr[3]);
		}

	}

	static class Input {
		BufferedReader br;
		StringTokenizer st;

		public Input(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
			try {
				st = new StringTokenizer(br.readLine());
			}catch(IOException e) {
				e.printStackTrace();
			}
		}

		public boolean hasNext() {
			try {
				while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				}
				return true;
			}catch(Exception e) {
				return false;
			}
		}

		public String next() {
			if(!hasNext()) {
				throw new InputMismatchException();
			}
			return st.nextToken("\r\n\t\f ");
		}

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

	}
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.util.StringTokenizer; StringTokenizer java.util import java.io.IOException; IOException java.io import java.util.InputMismatchException; InputMismatchException java.util import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.InputStream; InputStream java.io public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Input in = new Input(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		BJudgeStatusSummary solver = new BJudgeStatusSummary();
		solver.solve(1, in, out);
		out.close();
	}
	static class BJudgeStatusSummary {
		public void solve(int testNumber, Input in, PrintWriter out) {
			int n = in.nextInt();
			int[] arr = new int[4];
			for(int i = 0; i<n; i++) {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			}
			out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", arr[0], arr[1], arr[2], arr[3]);
		}

	}

	static class Input {
		BufferedReader br;
		StringTokenizer st;

		public Input(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
			try {
				st = new StringTokenizer(br.readLine());
			}catch(IOException e) {
				e.printStackTrace();
			}
		}

		public boolean hasNext() {
			try {
				while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				}
				return true;
			}catch(Exception e) {
				return false;
			}
		}

		public String next() {
			if(!hasNext()) {
				throw new InputMismatchException();
			}
			return st.nextToken("\r\n\t\f ");
		}

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

	}
} Main public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Input in = new Input(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		BJudgeStatusSummary solver = new BJudgeStatusSummary();
		solver.solve(1, in, out);
		out.close();
	} main {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Input in = new Input(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		BJudgeStatusSummary solver = new BJudgeStatusSummary();
		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 Input in = new Input(inputStream); in new Input(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) BJudgeStatusSummary solver = new BJudgeStatusSummary(); solver new BJudgeStatusSummary() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class BJudgeStatusSummary {
		public void solve(int testNumber, Input in, PrintWriter out) {
			int n = in.nextInt();
			int[] arr = new int[4];
			for(int i = 0; i<n; i++) {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			}
			out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", arr[0], arr[1], arr[2], arr[3]);
		}

	} BJudgeStatusSummary public void solve(int testNumber, Input in, PrintWriter out) {
			int n = in.nextInt();
			int[] arr = new int[4];
			for(int i = 0; i<n; i++) {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			}
			out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", arr[0], arr[1], arr[2], arr[3]);
		} solve {
			int n = in.nextInt();
			int[] arr = new int[4];
			for(int i = 0; i<n; i++) {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			}
			out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", arr[0], arr[1], arr[2], arr[3]);
		} int n = in.nextInt(); n in.nextInt() in.nextInt in int[] arr = new int[4]; arr new int[4] 4 for(int i = 0; i<n; i++) {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			} {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			} String s = in.next(); s in.next() in.next in if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				} s.equals("AC") s.equals s "AC" {
					arr[0]++;
				} arr[0]++ arr[0] arr 0 if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				} s.equals("WA") s.equals s "WA" {
					arr[1]++;
				} arr[1]++ arr[1] arr 1 if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				} s.equals("TLE") s.equals s "TLE" {
					arr[2]++;
				} arr[2]++ arr[2] arr 2 {
					arr[3]++;
				} arr[3]++ arr[3] arr 3 out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", arr[0], arr[1], arr[2], arr[3]) out.printf out "AC x %d\nWA x %d\nTLE x %d\nRE x %d\n" arr[0] arr 0 arr[1] arr 1 arr[2] arr 2 arr[3] arr 3 int testNumber testNumber Input in in PrintWriter out out static class Input {
		BufferedReader br;
		StringTokenizer st;

		public Input(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
			try {
				st = new StringTokenizer(br.readLine());
			}catch(IOException e) {
				e.printStackTrace();
			}
		}

		public boolean hasNext() {
			try {
				while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				}
				return true;
			}catch(Exception e) {
				return false;
			}
		}

		public String next() {
			if(!hasNext()) {
				throw new InputMismatchException();
			}
			return st.nextToken("\r\n\t\f ");
		}

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

	} Input BufferedReader br; br StringTokenizer st; st public Input(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
			try {
				st = new StringTokenizer(br.readLine());
			}catch(IOException e) {
				e.printStackTrace();
			}
		} Input {
			br = new BufferedReader(new InputStreamReader(is));
			try {
				st = new StringTokenizer(br.readLine());
			}catch(IOException e) {
				e.printStackTrace();
			}
		} br = new BufferedReader(new InputStreamReader(is)) br new BufferedReader(new InputStreamReader(is)) 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()) InputStream is is public boolean hasNext() {
			try {
				while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				}
				return true;
			}catch(Exception e) {
				return false;
			}
		} hasNext {
			try {
				while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				}
				return true;
			}catch(Exception e) {
				return false;
			}
		} try {
				while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				}
				return true;
			}catch(Exception e) {
				return false;
			} catch(Exception e) {
				return false;
			} Exception e {
				return false;
			} return false; false {
				while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				}
				return true;
			} while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				} !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				} String s = br.readLine(); s br.readLine() br.readLine br if(s==null) {
						return false;
					} s==null s null {
						return false;
					} return false; false st = new StringTokenizer(s) st new StringTokenizer(s) return true; true public String next() {
			if(!hasNext()) {
				throw new InputMismatchException();
			}
			return st.nextToken("\r\n\t\f ");
		} next {
			if(!hasNext()) {
				throw new InputMismatchException();
			}
			return st.nextToken("\r\n\t\f ");
		} if(!hasNext()) {
				throw new InputMismatchException();
			} !hasNext() hasNext() hasNext {
				throw new InputMismatchException();
			} throw new InputMismatchException(); new InputMismatchException() return st.nextToken("\r\n\t\f "); st.nextToken("\r\n\t\f ") st.nextToken st "\r\n\t\f " 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 class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Input in = new Input(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		BJudgeStatusSummary solver = new BJudgeStatusSummary();
		solver.solve(1, in, out);
		out.close();
	}
	static class BJudgeStatusSummary {
		public void solve(int testNumber, Input in, PrintWriter out) {
			int n = in.nextInt();
			int[] arr = new int[4];
			for(int i = 0; i<n; i++) {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			}
			out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", arr[0], arr[1], arr[2], arr[3]);
		}

	}

	static class Input {
		BufferedReader br;
		StringTokenizer st;

		public Input(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
			try {
				st = new StringTokenizer(br.readLine());
			}catch(IOException e) {
				e.printStackTrace();
			}
		}

		public boolean hasNext() {
			try {
				while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				}
				return true;
			}catch(Exception e) {
				return false;
			}
		}

		public String next() {
			if(!hasNext()) {
				throw new InputMismatchException();
			}
			return st.nextToken("\r\n\t\f ");
		}

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

	}
} public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Input in = new Input(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		BJudgeStatusSummary solver = new BJudgeStatusSummary();
		solver.solve(1, in, out);
		out.close();
	}
	static class BJudgeStatusSummary {
		public void solve(int testNumber, Input in, PrintWriter out) {
			int n = in.nextInt();
			int[] arr = new int[4];
			for(int i = 0; i<n; i++) {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			}
			out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", arr[0], arr[1], arr[2], arr[3]);
		}

	}

	static class Input {
		BufferedReader br;
		StringTokenizer st;

		public Input(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
			try {
				st = new StringTokenizer(br.readLine());
			}catch(IOException e) {
				e.printStackTrace();
			}
		}

		public boolean hasNext() {
			try {
				while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				}
				return true;
			}catch(Exception e) {
				return false;
			}
		}

		public String next() {
			if(!hasNext()) {
				throw new InputMismatchException();
			}
			return st.nextToken("\r\n\t\f ");
		}

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

	}
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Input in = new Input(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		BJudgeStatusSummary solver = new BJudgeStatusSummary();
		solver.solve(1, in, out);
		out.close();
	}
	static class BJudgeStatusSummary {
		public void solve(int testNumber, Input in, PrintWriter out) {
			int n = in.nextInt();
			int[] arr = new int[4];
			for(int i = 0; i<n; i++) {
				String s = in.next();
				if(s.equals("AC")) {
					arr[0]++;
				}else if(s.equals("WA")) {
					arr[1]++;
				}else if(s.equals("TLE")) {
					arr[2]++;
				}else {
					arr[3]++;
				}
			}
			out.printf("AC x %d\nWA x %d\nTLE x %d\nRE x %d\n", arr[0], arr[1], arr[2], arr[3]);
		}

	}

	static class Input {
		BufferedReader br;
		StringTokenizer st;

		public Input(InputStream is) {
			br = new BufferedReader(new InputStreamReader(is));
			try {
				st = new StringTokenizer(br.readLine());
			}catch(IOException e) {
				e.printStackTrace();
			}
		}

		public boolean hasNext() {
			try {
				while(!st.hasMoreTokens()) {
					String s = br.readLine();
					if(s==null) {
						return false;
					}
					st = new StringTokenizer(s);
				}
				return true;
			}catch(Exception e) {
				return false;
			}
		}

		public String next() {
			if(!hasNext()) {
				throw new InputMismatchException();
			}
			return st.nextToken("\r\n\t\f ");
		}

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

	}
}

