import java.io.IOException;
import java.util.Scanner;

public class Main {

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

		Scanner sc = new Scanner(System.in);
		boolean[][] card = new boolean[4][13];

		int n = sc.nextInt();

		for (int k = 0; k < n; k++) { // ????????????????????????????????£??\
			
			String mark = sc.next();
			char c = mark.charAt(0);
			int num = sc.nextInt();
			

			if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			}
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			}
		}
		sc.close();
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {

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

		Scanner sc = new Scanner(System.in);
		boolean[][] card = new boolean[4][13];

		int n = sc.nextInt();

		for (int k = 0; k < n; k++) { // ????????????????????????????????£??\
			
			String mark = sc.next();
			char c = mark.charAt(0);
			int num = sc.nextInt();
			

			if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			}
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			}
		}
		sc.close();
	}
} Main public static void main(String[] args)throws IOException {

		Scanner sc = new Scanner(System.in);
		boolean[][] card = new boolean[4][13];

		int n = sc.nextInt();

		for (int k = 0; k < n; k++) { // ????????????????????????????????£??\
			
			String mark = sc.next();
			char c = mark.charAt(0);
			int num = sc.nextInt();
			

			if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			}
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			}
		}
		sc.close();
	} main {

		Scanner sc = new Scanner(System.in);
		boolean[][] card = new boolean[4][13];

		int n = sc.nextInt();

		for (int k = 0; k < n; k++) { // ????????????????????????????????£??\
			
			String mark = sc.next();
			char c = mark.charAt(0);
			int num = sc.nextInt();
			

			if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			}
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			}
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) boolean[][] card = new boolean[4][13]; card new boolean[4][13] 4 13 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int k = 0; k < n; k++) { // ????????????????????????????????£??\
			
			String mark = sc.next();
			char c = mark.charAt(0);
			int num = sc.nextInt();
			

			if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			}
		} int k = 0; int k = 0; k 0 k < n k n k++ k++ k { // ????????????????????????????????£??\
			
			String mark = sc.next();
			char c = mark.charAt(0);
			int num = sc.nextInt();
			

			if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			}
		} { // ????????????????????????????????£??\
			
			String mark = sc.next();
			char c = mark.charAt(0);
			int num = sc.nextInt();
			

			if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			}
		} String mark = sc.next(); mark sc.next() sc.next sc char c = mark.charAt(0); c mark.charAt(0) mark.charAt mark 0 int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			} c == 'S' c 'S' {
				card[0][num - 1] = true;
			} card[0][num - 1] = true card[0][num - 1] card[0] card 0 num - 1 num 1 true if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			} c == 'H' c 'H' {
				card[1][num - 1] = true;
			} card[1][num - 1] = true card[1][num - 1] card[1] card 1 num - 1 num 1 true if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			} c == 'C' c 'C' {
				card[2][num - 1] = true;
			} card[2][num - 1] = true card[2][num - 1] card[2] card 2 num - 1 num 1 true if (c == 'D') {
				card[3][num - 1] = true;
			} c == 'D' c 'D' {
				card[3][num - 1] = true;
			} card[3][num - 1] = true card[3][num - 1] card[3] card 3 num - 1 num 1 true for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			}
		} {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			}
		} for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			} {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			} if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				} card[i][j] == false card[i][j] card[i] card i j false {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				} if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					} i == 0 i 0 {
						System.out.println("S" + " " + (j + 1));
					} System.out.println("S" + " " + (j + 1)) System.out.println System.out System System.out "S" + " " + (j + 1) "S" + " " + (j + 1) "S" " " (j + 1) j 1 if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					} i == 1 i 1 {
						System.out.println("H" + " " + (j + 1));
					} System.out.println("H" + " " + (j + 1)) System.out.println System.out System System.out "H" + " " + (j + 1) "H" + " " + (j + 1) "H" " " (j + 1) j 1 if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					} i == 2 i 2 {
						System.out.println("C" + " " + (j + 1));
					} System.out.println("C" + " " + (j + 1)) System.out.println System.out System System.out "C" + " " + (j + 1) "C" + " " + (j + 1) "C" " " (j + 1) j 1 if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					} i == 3 i 3 {
						System.out.println("D" + " " + (j + 1));
					} System.out.println("D" + " " + (j + 1)) System.out.println System.out System System.out "D" + " " + (j + 1) "D" + " " + (j + 1) "D" " " (j + 1) j 1 sc.close() sc.close sc String[] args args public class Main {

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

		Scanner sc = new Scanner(System.in);
		boolean[][] card = new boolean[4][13];

		int n = sc.nextInt();

		for (int k = 0; k < n; k++) { // ????????????????????????????????£??\
			
			String mark = sc.next();
			char c = mark.charAt(0);
			int num = sc.nextInt();
			

			if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			}
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			}
		}
		sc.close();
	}
} public class Main {

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

		Scanner sc = new Scanner(System.in);
		boolean[][] card = new boolean[4][13];

		int n = sc.nextInt();

		for (int k = 0; k < n; k++) { // ????????????????????????????????£??\
			
			String mark = sc.next();
			char c = mark.charAt(0);
			int num = sc.nextInt();
			

			if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			}
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			}
		}
		sc.close();
	}
} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {

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

		Scanner sc = new Scanner(System.in);
		boolean[][] card = new boolean[4][13];

		int n = sc.nextInt();

		for (int k = 0; k < n; k++) { // ????????????????????????????????£??\
			
			String mark = sc.next();
			char c = mark.charAt(0);
			int num = sc.nextInt();
			

			if (c == 'S') {
				card[0][num - 1] = true;
			} else if (c == 'H') {
				card[1][num - 1] = true;
			} else if (c == 'C') {
				card[2][num - 1] = true;
			} else if (c == 'D') {
				card[3][num - 1] = true;
			}
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					if (i == 0) {
						System.out.println("S" + " " + (j + 1));
					} else if (i == 1) {
						System.out.println("H" + " " + (j + 1));
					} else if (i == 2) {
						System.out.println("C" + " " + (j + 1));
					} else if (i == 3) {
						System.out.println("D" + " " + (j + 1));
					}
				}
			}
		}
		sc.close();
	}
}