import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int length = scanner.nextInt();
		boolean[][] list = new boolean[4][13];

		for (int i = 0; i < length; i++) {
			String pattern = scanner.next();
			int number = scanner.nextInt();

			if (pattern.equals("S"))
				list[0][number - 1] = true;
			else if (pattern.equals("H"))
				list[1][number - 1] = true;
			else if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int i2 = 0; i2 < 13; i2++) {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			}
		}
	}
} import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int length = scanner.nextInt();
		boolean[][] list = new boolean[4][13];

		for (int i = 0; i < length; i++) {
			String pattern = scanner.next();
			int number = scanner.nextInt();

			if (pattern.equals("S"))
				list[0][number - 1] = true;
			else if (pattern.equals("H"))
				list[1][number - 1] = true;
			else if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int i2 = 0; i2 < 13; i2++) {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			}
		}
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int length = scanner.nextInt();
		boolean[][] list = new boolean[4][13];

		for (int i = 0; i < length; i++) {
			String pattern = scanner.next();
			int number = scanner.nextInt();

			if (pattern.equals("S"))
				list[0][number - 1] = true;
			else if (pattern.equals("H"))
				list[1][number - 1] = true;
			else if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int i2 = 0; i2 < 13; i2++) {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			}
		}
	} main {
		Scanner scanner = new Scanner(System.in);
		int length = scanner.nextInt();
		boolean[][] list = new boolean[4][13];

		for (int i = 0; i < length; i++) {
			String pattern = scanner.next();
			int number = scanner.nextInt();

			if (pattern.equals("S"))
				list[0][number - 1] = true;
			else if (pattern.equals("H"))
				list[1][number - 1] = true;
			else if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int i2 = 0; i2 < 13; i2++) {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			}
		}
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int length = scanner.nextInt(); length scanner.nextInt() scanner.nextInt scanner boolean[][] list = new boolean[4][13]; list new boolean[4][13] 4 13 for (int i = 0; i < length; i++) {
			String pattern = scanner.next();
			int number = scanner.nextInt();

			if (pattern.equals("S"))
				list[0][number - 1] = true;
			else if (pattern.equals("H"))
				list[1][number - 1] = true;
			else if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true;
		} int i = 0; int i = 0; i 0 i < length i length i++ i++ i {
			String pattern = scanner.next();
			int number = scanner.nextInt();

			if (pattern.equals("S"))
				list[0][number - 1] = true;
			else if (pattern.equals("H"))
				list[1][number - 1] = true;
			else if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true;
		} {
			String pattern = scanner.next();
			int number = scanner.nextInt();

			if (pattern.equals("S"))
				list[0][number - 1] = true;
			else if (pattern.equals("H"))
				list[1][number - 1] = true;
			else if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true;
		} String pattern = scanner.next(); pattern scanner.next() scanner.next scanner int number = scanner.nextInt(); number scanner.nextInt() scanner.nextInt scanner if (pattern.equals("S"))
				list[0][number - 1] = true;
			else if (pattern.equals("H"))
				list[1][number - 1] = true;
			else if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true; pattern.equals("S") pattern.equals pattern "S" list[0][number - 1] = true list[0][number - 1] list[0] list 0 number - 1 number 1 true if (pattern.equals("H"))
				list[1][number - 1] = true;
			else if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true; pattern.equals("H") pattern.equals pattern "H" list[1][number - 1] = true list[1][number - 1] list[1] list 1 number - 1 number 1 true if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true; pattern.equals("C") pattern.equals pattern "C" list[2][number - 1] = true list[2][number - 1] list[2] list 2 number - 1 number 1 true if (pattern.equals("D"))
				list[3][number - 1] = true; pattern.equals("D") pattern.equals pattern "D" list[3][number - 1] = true list[3][number - 1] list[3] list 3 number - 1 number 1 true for (int i = 0; i < 4; i++) {
			for (int i2 = 0; i2 < 13; i2++) {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			for (int i2 = 0; i2 < 13; i2++) {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			}
		} {
			for (int i2 = 0; i2 < 13; i2++) {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			}
		} for (int i2 = 0; i2 < 13; i2++) {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			} int i2 = 0; int i2 = 0; i2 0 i2 < 13 i2 13 i2++ i2++ i2 {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			} {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			} if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				} list[i][i2] != true list[i][i2] list[i] list i i2 true {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				} if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D"); i == 0 i 0 System.out.print("S") System.out.print System.out System System.out "S" if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D"); i == 1 i 1 System.out.print("H") System.out.print System.out System System.out "H" if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D"); i == 2 i 2 System.out.print("C") System.out.print System.out System System.out "C" if (i == 3)
						System.out.print("D"); i == 3 i 3 System.out.print("D") System.out.print System.out System System.out "D" System.out.println(" " + (i2 + 1)) System.out.println System.out System System.out " " + (i2 + 1) " " (i2 + 1) i2 1 String[] args args
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		int length = scanner.nextInt();
		boolean[][] list = new boolean[4][13];

		for (int i = 0; i < length; i++) {
			String pattern = scanner.next();
			int number = scanner.nextInt();

			if (pattern.equals("S"))
				list[0][number - 1] = true;
			else if (pattern.equals("H"))
				list[1][number - 1] = true;
			else if (pattern.equals("C"))
				list[2][number - 1] = true;
			else if (pattern.equals("D"))
				list[3][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int i2 = 0; i2 < 13; i2++) {
				if (list[i][i2] != true) {
					if (i == 0)
						System.out.print("S");
					else if (i == 1)
						System.out.print("H");
					else if (i == 2)
						System.out.print("C");
					else if (i == 3)
						System.out.print("D");

					System.out.println(" " + (i2 + 1));
				}

			}
		}
	}
}