import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int N = Integer.parseInt(line1);

		String[] inputData = new String[N];
		for (int i = 0; i < N; i++) {
			String line2 = sc.nextLine();
			inputData[i] = line2;
		}

		boolean[] cards = new boolean[52];
		for (int i = 0; i < cards.length; i++) {
			cards[i] = false;
		}

		int x = 0;
		for (int i = 0; i < inputData.length; i++) {
			String str = inputData[i].substring(0, 1);
			if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			}
			x += Integer.parseInt(inputData[i].substring(2)) - 1;
			cards[x] = true;
		}
		for (int i = 0; i < cards.length; i++) {
			if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int N = Integer.parseInt(line1);

		String[] inputData = new String[N];
		for (int i = 0; i < N; i++) {
			String line2 = sc.nextLine();
			inputData[i] = line2;
		}

		boolean[] cards = new boolean[52];
		for (int i = 0; i < cards.length; i++) {
			cards[i] = false;
		}

		int x = 0;
		for (int i = 0; i < inputData.length; i++) {
			String str = inputData[i].substring(0, 1);
			if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			}
			x += Integer.parseInt(inputData[i].substring(2)) - 1;
			cards[x] = true;
		}
		for (int i = 0; i < cards.length; i++) {
			if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			}
		}
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int N = Integer.parseInt(line1);

		String[] inputData = new String[N];
		for (int i = 0; i < N; i++) {
			String line2 = sc.nextLine();
			inputData[i] = line2;
		}

		boolean[] cards = new boolean[52];
		for (int i = 0; i < cards.length; i++) {
			cards[i] = false;
		}

		int x = 0;
		for (int i = 0; i < inputData.length; i++) {
			String str = inputData[i].substring(0, 1);
			if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			}
			x += Integer.parseInt(inputData[i].substring(2)) - 1;
			cards[x] = true;
		}
		for (int i = 0; i < cards.length; i++) {
			if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			}
		}
	} main {

		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int N = Integer.parseInt(line1);

		String[] inputData = new String[N];
		for (int i = 0; i < N; i++) {
			String line2 = sc.nextLine();
			inputData[i] = line2;
		}

		boolean[] cards = new boolean[52];
		for (int i = 0; i < cards.length; i++) {
			cards[i] = false;
		}

		int x = 0;
		for (int i = 0; i < inputData.length; i++) {
			String str = inputData[i].substring(0, 1);
			if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			}
			x += Integer.parseInt(inputData[i].substring(2)) - 1;
			cards[x] = true;
		}
		for (int i = 0; i < cards.length; i++) {
			if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line1 = sc.nextLine(); line1 sc.nextLine() sc.nextLine sc int N = Integer.parseInt(line1); N Integer.parseInt(line1) Integer.parseInt Integer line1 String[] inputData = new String[N]; inputData new String[N] N for (int i = 0; i < N; i++) {
			String line2 = sc.nextLine();
			inputData[i] = line2;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			String line2 = sc.nextLine();
			inputData[i] = line2;
		} {
			String line2 = sc.nextLine();
			inputData[i] = line2;
		} String line2 = sc.nextLine(); line2 sc.nextLine() sc.nextLine sc inputData[i] = line2 inputData[i] inputData i line2 boolean[] cards = new boolean[52]; cards new boolean[52] 52 for (int i = 0; i < cards.length; i++) {
			cards[i] = false;
		} int i = 0; int i = 0; i 0 i < cards.length i cards.length cards cards.length i++ i++ i {
			cards[i] = false;
		} {
			cards[i] = false;
		} cards[i] = false cards[i] cards i false int x = 0; x 0 for (int i = 0; i < inputData.length; i++) {
			String str = inputData[i].substring(0, 1);
			if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			}
			x += Integer.parseInt(inputData[i].substring(2)) - 1;
			cards[x] = true;
		} int i = 0; int i = 0; i 0 i < inputData.length i inputData.length inputData inputData.length i++ i++ i {
			String str = inputData[i].substring(0, 1);
			if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			}
			x += Integer.parseInt(inputData[i].substring(2)) - 1;
			cards[x] = true;
		} {
			String str = inputData[i].substring(0, 1);
			if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			}
			x += Integer.parseInt(inputData[i].substring(2)) - 1;
			cards[x] = true;
		} String str = inputData[i].substring(0, 1); str inputData[i].substring(0, 1) inputData[i].substring inputData[i] inputData i 0 1 if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			} str.equals("S") str.equals str "S" {
				x = 0;

			} x = 0 x 0 if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			} str.equals("H") str.equals str "H" {
				x = 13;

			} x = 13 x 13 if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			} str.equals("C") str.equals str "C" {
				x = 13 * 2;

			} x = 13 * 2 x 13 * 2 13 2 if (str.equals("D")) {
				x = 13 * 3;

			} str.equals("D") str.equals str "D" {
				x = 13 * 3;

			} x = 13 * 3 x 13 * 3 13 3 x += Integer.parseInt(inputData[i].substring(2)) - 1 x Integer.parseInt(inputData[i].substring(2)) - 1 Integer.parseInt(inputData[i].substring(2)) Integer.parseInt Integer inputData[i].substring(2) inputData[i].substring inputData[i] inputData i 2 1 cards[x] = true cards[x] cards x true for (int i = 0; i < cards.length; i++) {
			if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			}
		} int i = 0; int i = 0; i 0 i < cards.length i cards.length cards cards.length i++ i++ i {
			if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			}
		} {
			if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			}
		} if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			} cards[i] == false cards[i] cards i false {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			} if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				} i / 13 == 0 i / 13 i 13 0 {
					System.out.print("S ");

				} System.out.print("S ") System.out.print System.out System System.out "S " if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				} i / 13 == 1 i / 13 i 13 1 {
					System.out.print("H ");
				} System.out.print("H ") System.out.print System.out System System.out "H " if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				} i / 13 == 2 i / 13 i 13 2 {
					System.out.print("C ");
				} System.out.print("C ") System.out.print System.out System System.out "C " if (i / 13 == 3) {
					System.out.print("D ");
				} i / 13 == 3 i / 13 i 13 3 {
					System.out.print("D ");
				} System.out.print("D ") System.out.print System.out System System.out "D " System.out.println(String.valueOf(i % 13 + 1)) System.out.println System.out System System.out String.valueOf(i % 13 + 1) String.valueOf String i % 13 + 1 i % 13 i 13 1 String[] args args public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int N = Integer.parseInt(line1);

		String[] inputData = new String[N];
		for (int i = 0; i < N; i++) {
			String line2 = sc.nextLine();
			inputData[i] = line2;
		}

		boolean[] cards = new boolean[52];
		for (int i = 0; i < cards.length; i++) {
			cards[i] = false;
		}

		int x = 0;
		for (int i = 0; i < inputData.length; i++) {
			String str = inputData[i].substring(0, 1);
			if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			}
			x += Integer.parseInt(inputData[i].substring(2)) - 1;
			cards[x] = true;
		}
		for (int i = 0; i < cards.length; i++) {
			if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			}
		}
	}
} public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int N = Integer.parseInt(line1);

		String[] inputData = new String[N];
		for (int i = 0; i < N; i++) {
			String line2 = sc.nextLine();
			inputData[i] = line2;
		}

		boolean[] cards = new boolean[52];
		for (int i = 0; i < cards.length; i++) {
			cards[i] = false;
		}

		int x = 0;
		for (int i = 0; i < inputData.length; i++) {
			String str = inputData[i].substring(0, 1);
			if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			}
			x += Integer.parseInt(inputData[i].substring(2)) - 1;
			cards[x] = true;
		}
		for (int i = 0; i < cards.length; i++) {
			if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			}
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int N = Integer.parseInt(line1);

		String[] inputData = new String[N];
		for (int i = 0; i < N; i++) {
			String line2 = sc.nextLine();
			inputData[i] = line2;
		}

		boolean[] cards = new boolean[52];
		for (int i = 0; i < cards.length; i++) {
			cards[i] = false;
		}

		int x = 0;
		for (int i = 0; i < inputData.length; i++) {
			String str = inputData[i].substring(0, 1);
			if (str.equals("S")) {
				x = 0;

			} else if (str.equals("H")) {
				x = 13;

			} else if (str.equals("C")) {
				x = 13 * 2;

			} else if (str.equals("D")) {
				x = 13 * 3;

			}
			x += Integer.parseInt(inputData[i].substring(2)) - 1;
			cards[x] = true;
		}
		for (int i = 0; i < cards.length; i++) {
			if (cards[i] == false) {
				if (i / 13 == 0) {
					System.out.print("S ");

				} else if (i / 13 == 1) {
					System.out.print("H ");
				} else if (i / 13 == 2) {
					System.out.print("C ");
				} else if (i / 13 == 3) {
					System.out.print("D ");
				}
				System.out.println(String.valueOf(i % 13 + 1));
			}
		}
	}
}