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

//

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner (System.in);
		int num = scan.nextInt();

		boolean[] [] cards = new boolean[4] [13];

		for (int i = 0; i < num; i++) {
			String design = scan.next();
			int cardNumber = scan.nextInt();

			int designNumber = 0;

			if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			}
			cards[designNumber][cardNumber - 1] = true;
		}
		for (int i = 0; i < 4; i++ ) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			}
		}
	}
} 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 scan = new Scanner (System.in);
		int num = scan.nextInt();

		boolean[] [] cards = new boolean[4] [13];

		for (int i = 0; i < num; i++) {
			String design = scan.next();
			int cardNumber = scan.nextInt();

			int designNumber = 0;

			if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			}
			cards[designNumber][cardNumber - 1] = true;
		}
		for (int i = 0; i < 4; i++ ) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			}
		}
	}
} Main public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner (System.in);
		int num = scan.nextInt();

		boolean[] [] cards = new boolean[4] [13];

		for (int i = 0; i < num; i++) {
			String design = scan.next();
			int cardNumber = scan.nextInt();

			int designNumber = 0;

			if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			}
			cards[designNumber][cardNumber - 1] = true;
		}
		for (int i = 0; i < 4; i++ ) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			}
		}
	} main {
		Scanner scan = new Scanner (System.in);
		int num = scan.nextInt();

		boolean[] [] cards = new boolean[4] [13];

		for (int i = 0; i < num; i++) {
			String design = scan.next();
			int cardNumber = scan.nextInt();

			int designNumber = 0;

			if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			}
			cards[designNumber][cardNumber - 1] = true;
		}
		for (int i = 0; i < 4; i++ ) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			}
		}
	} Scanner scan = new Scanner (System.in); scan new Scanner (System.in) int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan boolean[] [] cards = new boolean[4] [13]; cards new boolean[4] [13] 4 13 for (int i = 0; i < num; i++) {
			String design = scan.next();
			int cardNumber = scan.nextInt();

			int designNumber = 0;

			if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			}
			cards[designNumber][cardNumber - 1] = true;
		} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
			String design = scan.next();
			int cardNumber = scan.nextInt();

			int designNumber = 0;

			if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			}
			cards[designNumber][cardNumber - 1] = true;
		} {
			String design = scan.next();
			int cardNumber = scan.nextInt();

			int designNumber = 0;

			if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			}
			cards[designNumber][cardNumber - 1] = true;
		} String design = scan.next(); design scan.next() scan.next scan int cardNumber = scan.nextInt(); cardNumber scan.nextInt() scan.nextInt scan int designNumber = 0; designNumber 0 if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			} design.equals("S") design.equals design "S" {
				designNumber = 0;
			} designNumber = 0 designNumber 0 if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			} design.equals("H") design.equals design "H" {
				designNumber = 1;
			} designNumber = 1 designNumber 1 if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			} design.equals("C") design.equals design "C" {
				designNumber = 2;
			} designNumber = 2 designNumber 2 if (design.equals("D")) {
				designNumber = 3;
			} design.equals("D") design.equals design "D" {
				designNumber = 3;
			} designNumber = 3 designNumber 3 cards[designNumber][cardNumber - 1] = true cards[designNumber][cardNumber - 1] cards[designNumber] cards designNumber cardNumber - 1 cardNumber 1 true for (int i = 0; i < 4; i++ ) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == false) {
					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(" " + (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 (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			}
		} {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			}
		} for (int j = 0; j < 13; j++) {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			} {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			} if (cards[i][j] == false) {
					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(" " + (j + 1));
				} cards[i][j] == false cards[i][j] cards[i] cards i j false {
					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(" " + (j + 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("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("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("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("D") System.out.print System.out System System.out "D" System.out.println(" " + (j + 1)) System.out.println System.out System System.out " " + (j + 1) " " (j + 1) j 1 String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner (System.in);
		int num = scan.nextInt();

		boolean[] [] cards = new boolean[4] [13];

		for (int i = 0; i < num; i++) {
			String design = scan.next();
			int cardNumber = scan.nextInt();

			int designNumber = 0;

			if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			}
			cards[designNumber][cardNumber - 1] = true;
		}
		for (int i = 0; i < 4; i++ ) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			}
		}
	}
} public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner (System.in);
		int num = scan.nextInt();

		boolean[] [] cards = new boolean[4] [13];

		for (int i = 0; i < num; i++) {
			String design = scan.next();
			int cardNumber = scan.nextInt();

			int designNumber = 0;

			if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			}
			cards[designNumber][cardNumber - 1] = true;
		}
		for (int i = 0; i < 4; i++ ) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			}
		}
	}
} Main
import java.io.IOException;
import java.util.Scanner;

//

public class Main {

	public static void main(String[] args) throws IOException {
		Scanner scan = new Scanner (System.in);
		int num = scan.nextInt();

		boolean[] [] cards = new boolean[4] [13];

		for (int i = 0; i < num; i++) {
			String design = scan.next();
			int cardNumber = scan.nextInt();

			int designNumber = 0;

			if (design.equals("S")) {
				designNumber = 0;
			} else if (design.equals("H")) {
				designNumber = 1;
			} else if (design.equals("C")) {
				designNumber = 2;
			} else if (design.equals("D")) {
				designNumber = 3;
			}
			cards[designNumber][cardNumber - 1] = true;
		}
		for (int i = 0; i < 4; i++ ) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == false) {
					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(" " + (j + 1));
				}
			}
		}
	}
}