import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {

		int[][] trump = new int [4][13];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i =0; i < n; i++) {
			String[] info = br.readLine().split(" ");
			int num = Integer.parseInt(info[1]);

			if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			}
		}

		String blank = " ";
		for (int i = 0; i< trump.length; i++) {
			for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			}
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {

		int[][] trump = new int [4][13];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i =0; i < n; i++) {
			String[] info = br.readLine().split(" ");
			int num = Integer.parseInt(info[1]);

			if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			}
		}

		String blank = " ";
		for (int i = 0; i< trump.length; i++) {
			for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			}
		}
	}
} Main public static void main(String[] args) throws IOException {

		int[][] trump = new int [4][13];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i =0; i < n; i++) {
			String[] info = br.readLine().split(" ");
			int num = Integer.parseInt(info[1]);

			if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			}
		}

		String blank = " ";
		for (int i = 0; i< trump.length; i++) {
			for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			}
		}
	} main {

		int[][] trump = new int [4][13];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i =0; i < n; i++) {
			String[] info = br.readLine().split(" ");
			int num = Integer.parseInt(info[1]);

			if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			}
		}

		String blank = " ";
		for (int i = 0; i< trump.length; i++) {
			for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			}
		}
	} int[][] trump = new int [4][13]; trump new int [4][13] 4 13 BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for (int i =0; i < n; i++) {
			String[] info = br.readLine().split(" ");
			int num = Integer.parseInt(info[1]);

			if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			}
		} int i =0; int i =0; i 0 i < n i n i++ i++ i {
			String[] info = br.readLine().split(" ");
			int num = Integer.parseInt(info[1]);

			if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			}
		} {
			String[] info = br.readLine().split(" ");
			int num = Integer.parseInt(info[1]);

			if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			}
		} String[] info = br.readLine().split(" "); info br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int num = Integer.parseInt(info[1]); num Integer.parseInt(info[1]) Integer.parseInt Integer info[1] info 1 if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			} "S".equals(info[0]) "S".equals "S" info[0] info 0 {
				trump[0][num-1] = 1;
			} trump[0][num-1] = 1 trump[0][num-1] trump[0] trump 0 num-1 num 1 1 if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			} "H".equals(info[0]) "H".equals "H" info[0] info 0 {
				trump[1][num-1] = 1;
			} trump[1][num-1] = 1 trump[1][num-1] trump[1] trump 1 num-1 num 1 1 if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			} "C".equals(info[0]) "C".equals "C" info[0] info 0 {
				trump[2][num-1] = 1;
			} trump[2][num-1] = 1 trump[2][num-1] trump[2] trump 2 num-1 num 1 1 if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			} "D".equals(info[0]) "D".equals "D" info[0] info 0 {
				trump[3][num-1] = 1;
			} trump[3][num-1] = 1 trump[3][num-1] trump[3] trump 3 num-1 num 1 1 String blank = " "; blank " " for (int i = 0; i< trump.length; i++) {
			for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			}
		} int i = 0; int i = 0; i 0 i< trump.length i trump.length trump trump.length i++ i++ i {
			for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			}
		} {
			for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			}
		} for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			} int j = 0; int j = 0; j 0 j < trump[0].length j trump[0].length trump[0] trump 0 trump[0].length j++ j++ j {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			} {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			} if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				} trump[i][j] == 0 trump[i][j] trump[i] trump i j 0 {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				} if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					} i == 0 i 0 {
						System.out.println("S" + blank + (j + 1));
					} System.out.println("S" + blank + (j + 1)) System.out.println System.out System System.out "S" + blank + (j + 1) "S" + blank + (j + 1) "S" blank (j + 1) j 1 if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					} i == 1 i 1 {
						System.out.println("H" + blank + (j + 1));
					} System.out.println("H" + blank + (j + 1)) System.out.println System.out System System.out "H" + blank + (j + 1) "H" + blank + (j + 1) "H" blank (j + 1) j 1 if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					} i == 2 i 2 {
						System.out.println("C" + blank + (j + 1));
					} System.out.println("C" + blank + (j + 1)) System.out.println System.out System System.out "C" + blank + (j + 1) "C" + blank + (j + 1) "C" blank (j + 1) j 1 {
						System.out.println("D" + blank + (j + 1));
					} System.out.println("D" + blank + (j + 1)) System.out.println System.out System System.out "D" + blank + (j + 1) "D" + blank + (j + 1) "D" blank (j + 1) j 1 String[] args args public class Main {

	public static void main(String[] args) throws IOException {

		int[][] trump = new int [4][13];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i =0; i < n; i++) {
			String[] info = br.readLine().split(" ");
			int num = Integer.parseInt(info[1]);

			if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			}
		}

		String blank = " ";
		for (int i = 0; i< trump.length; i++) {
			for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			}
		}
	}
} public class Main {

	public static void main(String[] args) throws IOException {

		int[][] trump = new int [4][13];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i =0; i < n; i++) {
			String[] info = br.readLine().split(" ");
			int num = Integer.parseInt(info[1]);

			if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			}
		}

		String blank = " ";
		for (int i = 0; i< trump.length; i++) {
			for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			}
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {

		int[][] trump = new int [4][13];
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i =0; i < n; i++) {
			String[] info = br.readLine().split(" ");
			int num = Integer.parseInt(info[1]);

			if ("S".equals(info[0])) {
				trump[0][num-1] = 1;
			} else if ("H".equals(info[0])) {
				trump[1][num-1] = 1;
			} else if ("C".equals(info[0])) {
				trump[2][num-1] = 1;
			} else if ("D".equals(info[0])) {
				trump[3][num-1] = 1;
			}
		}

		String blank = " ";
		for (int i = 0; i< trump.length; i++) {
			for (int j = 0; j < trump[0].length; j++) {
				if (trump[i][j] == 0) {
					if (i == 0) {
						System.out.println("S" + blank + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + blank + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + blank + (j + 1));
					} else {
						System.out.println("D" + blank + (j + 1));
					}
				}
			}
		}
	}
}