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

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		// ????????????????????°????????????????????????
		int Mark = 4;
		int Num = 13;
		// ????????????????????°????????????????????????
		int cards_Array[][] = new int[Mark][Num];
		String cards = input.readLine();
		// ?????£??????????????????????????°?????????
		int num_of_T = Integer.parseInt(cards);
		int mark_num = 0;
		int card_num = 0;

		for (int i = 0; i < num_of_T; i++) {
			String input_b = input.readLine();
			String[] strAry = input_b.split(" ");
			// ??????????????????
			String T_Mark = strAry[0];
			// ?????????????????????????????\??????????????¨??????????????????
			if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			}
			// ?????????????????°
			card_num = Integer.parseInt(strAry[1]);
			cards_Array[mark_num][card_num - 1] = 1;
		}
              //??????????????°
		for (int design_gr = 0; design_gr < Mark; design_gr++) {
			//??°???
			for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			}

		}

	}//
} 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 {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		// ????????????????????°????????????????????????
		int Mark = 4;
		int Num = 13;
		// ????????????????????°????????????????????????
		int cards_Array[][] = new int[Mark][Num];
		String cards = input.readLine();
		// ?????£??????????????????????????°?????????
		int num_of_T = Integer.parseInt(cards);
		int mark_num = 0;
		int card_num = 0;

		for (int i = 0; i < num_of_T; i++) {
			String input_b = input.readLine();
			String[] strAry = input_b.split(" ");
			// ??????????????????
			String T_Mark = strAry[0];
			// ?????????????????????????????\??????????????¨??????????????????
			if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			}
			// ?????????????????°
			card_num = Integer.parseInt(strAry[1]);
			cards_Array[mark_num][card_num - 1] = 1;
		}
              //??????????????°
		for (int design_gr = 0; design_gr < Mark; design_gr++) {
			//??°???
			for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			}

		}

	}//
} Main public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		// ????????????????????°????????????????????????
		int Mark = 4;
		int Num = 13;
		// ????????????????????°????????????????????????
		int cards_Array[][] = new int[Mark][Num];
		String cards = input.readLine();
		// ?????£??????????????????????????°?????????
		int num_of_T = Integer.parseInt(cards);
		int mark_num = 0;
		int card_num = 0;

		for (int i = 0; i < num_of_T; i++) {
			String input_b = input.readLine();
			String[] strAry = input_b.split(" ");
			// ??????????????????
			String T_Mark = strAry[0];
			// ?????????????????????????????\??????????????¨??????????????????
			if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			}
			// ?????????????????°
			card_num = Integer.parseInt(strAry[1]);
			cards_Array[mark_num][card_num - 1] = 1;
		}
              //??????????????°
		for (int design_gr = 0; design_gr < Mark; design_gr++) {
			//??°???
			for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			}

		}

	}// main {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		// ????????????????????°????????????????????????
		int Mark = 4;
		int Num = 13;
		// ????????????????????°????????????????????????
		int cards_Array[][] = new int[Mark][Num];
		String cards = input.readLine();
		// ?????£??????????????????????????°?????????
		int num_of_T = Integer.parseInt(cards);
		int mark_num = 0;
		int card_num = 0;

		for (int i = 0; i < num_of_T; i++) {
			String input_b = input.readLine();
			String[] strAry = input_b.split(" ");
			// ??????????????????
			String T_Mark = strAry[0];
			// ?????????????????????????????\??????????????¨??????????????????
			if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			}
			// ?????????????????°
			card_num = Integer.parseInt(strAry[1]);
			cards_Array[mark_num][card_num - 1] = 1;
		}
              //??????????????°
		for (int design_gr = 0; design_gr < Mark; design_gr++) {
			//??°???
			for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			}

		}

	} BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) int Mark = 4; Mark 4 int Num = 13; Num 13 int cards_Array[][] = new int[Mark][Num]; cards_Array new int[Mark][Num] Mark Num String cards = input.readLine(); cards input.readLine() input.readLine input int num_of_T = Integer.parseInt(cards); num_of_T Integer.parseInt(cards) Integer.parseInt Integer cards int mark_num = 0; mark_num 0 int card_num = 0; card_num 0 for (int i = 0; i < num_of_T; i++) {
			String input_b = input.readLine();
			String[] strAry = input_b.split(" ");
			// ??????????????????
			String T_Mark = strAry[0];
			// ?????????????????????????????\??????????????¨??????????????????
			if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			}
			// ?????????????????°
			card_num = Integer.parseInt(strAry[1]);
			cards_Array[mark_num][card_num - 1] = 1;
		} int i = 0; int i = 0; i 0 i < num_of_T i num_of_T i++ i++ i {
			String input_b = input.readLine();
			String[] strAry = input_b.split(" ");
			// ??????????????????
			String T_Mark = strAry[0];
			// ?????????????????????????????\??????????????¨??????????????????
			if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			}
			// ?????????????????°
			card_num = Integer.parseInt(strAry[1]);
			cards_Array[mark_num][card_num - 1] = 1;
		} {
			String input_b = input.readLine();
			String[] strAry = input_b.split(" ");
			// ??????????????????
			String T_Mark = strAry[0];
			// ?????????????????????????????\??????????????¨??????????????????
			if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			}
			// ?????????????????°
			card_num = Integer.parseInt(strAry[1]);
			cards_Array[mark_num][card_num - 1] = 1;
		} String input_b = input.readLine(); input_b input.readLine() input.readLine input String[] strAry = input_b.split(" "); strAry input_b.split(" ") input_b.split input_b " " String T_Mark = strAry[0]; T_Mark strAry[0] strAry 0 if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			} T_Mark.equals("S") T_Mark.equals T_Mark "S" {
				mark_num = 0;
			} mark_num = 0 mark_num 0 if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			} T_Mark.equals("H") T_Mark.equals T_Mark "H" {
				mark_num = 1;
			} mark_num = 1 mark_num 1 if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			} T_Mark.equals("C") T_Mark.equals T_Mark "C" {
				mark_num = 2;
			} mark_num = 2 mark_num 2 if (T_Mark.equals("D")) {
				mark_num = 3;
			} T_Mark.equals("D") T_Mark.equals T_Mark "D" {
				mark_num = 3;
			} mark_num = 3 mark_num 3 card_num = Integer.parseInt(strAry[1]) card_num Integer.parseInt(strAry[1]) Integer.parseInt Integer strAry[1] strAry 1 cards_Array[mark_num][card_num - 1] = 1 cards_Array[mark_num][card_num - 1] cards_Array[mark_num] cards_Array mark_num card_num - 1 card_num 1 1 for (int design_gr = 0; design_gr < Mark; design_gr++) {
			//??°???
			for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			}

		} int design_gr = 0; int design_gr = 0; design_gr 0 design_gr < Mark design_gr Mark design_gr++ design_gr++ design_gr {
			//??°???
			for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			}

		} {
			//??°???
			for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			}

		} for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			} int number_gr = 0; int number_gr = 0; number_gr 0 number_gr < Num number_gr Num number_gr++ number_gr++ number_gr {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			} {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			} if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				} cards_Array[design_gr][number_gr] != 1 cards_Array[design_gr][number_gr] cards_Array[design_gr] cards_Array design_gr number_gr 1 {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				} int cards_of_re = number_gr + 1; cards_of_re number_gr + 1 number_gr 1 if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					} design_gr == 0 design_gr 0 {
						System.out.println("S" + " " + cards_of_re);
					} System.out.println("S" + " " + cards_of_re) System.out.println System.out System System.out "S" + " " + cards_of_re "S" + " " + cards_of_re "S" " " cards_of_re if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					} design_gr == 1 design_gr 1 {
						System.out.println("H" + " " + cards_of_re);
					} System.out.println("H" + " " + cards_of_re) System.out.println System.out System System.out "H" + " " + cards_of_re "H" + " " + cards_of_re "H" " " cards_of_re if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					} design_gr == 2 design_gr 2 {
						System.out.println("C" + " " + cards_of_re);
					} System.out.println("C" + " " + cards_of_re) System.out.println System.out System System.out "C" + " " + cards_of_re "C" + " " + cards_of_re "C" " " cards_of_re {
						System.out.println("D" + " " + cards_of_re);
					} System.out.println("D" + " " + cards_of_re) System.out.println System.out System System.out "D" + " " + cards_of_re "D" + " " + cards_of_re "D" " " cards_of_re String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		// ????????????????????°????????????????????????
		int Mark = 4;
		int Num = 13;
		// ????????????????????°????????????????????????
		int cards_Array[][] = new int[Mark][Num];
		String cards = input.readLine();
		// ?????£??????????????????????????°?????????
		int num_of_T = Integer.parseInt(cards);
		int mark_num = 0;
		int card_num = 0;

		for (int i = 0; i < num_of_T; i++) {
			String input_b = input.readLine();
			String[] strAry = input_b.split(" ");
			// ??????????????????
			String T_Mark = strAry[0];
			// ?????????????????????????????\??????????????¨??????????????????
			if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			}
			// ?????????????????°
			card_num = Integer.parseInt(strAry[1]);
			cards_Array[mark_num][card_num - 1] = 1;
		}
              //??????????????°
		for (int design_gr = 0; design_gr < Mark; design_gr++) {
			//??°???
			for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			}

		}

	}//
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		// ????????????????????°????????????????????????
		int Mark = 4;
		int Num = 13;
		// ????????????????????°????????????????????????
		int cards_Array[][] = new int[Mark][Num];
		String cards = input.readLine();
		// ?????£??????????????????????????°?????????
		int num_of_T = Integer.parseInt(cards);
		int mark_num = 0;
		int card_num = 0;

		for (int i = 0; i < num_of_T; i++) {
			String input_b = input.readLine();
			String[] strAry = input_b.split(" ");
			// ??????????????????
			String T_Mark = strAry[0];
			// ?????????????????????????????\??????????????¨??????????????????
			if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			}
			// ?????????????????°
			card_num = Integer.parseInt(strAry[1]);
			cards_Array[mark_num][card_num - 1] = 1;
		}
              //??????????????°
		for (int design_gr = 0; design_gr < Mark; design_gr++) {
			//??°???
			for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			}

		}

	}//
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
		// ????????????????????°????????????????????????
		int Mark = 4;
		int Num = 13;
		// ????????????????????°????????????????????????
		int cards_Array[][] = new int[Mark][Num];
		String cards = input.readLine();
		// ?????£??????????????????????????°?????????
		int num_of_T = Integer.parseInt(cards);
		int mark_num = 0;
		int card_num = 0;

		for (int i = 0; i < num_of_T; i++) {
			String input_b = input.readLine();
			String[] strAry = input_b.split(" ");
			// ??????????????????
			String T_Mark = strAry[0];
			// ?????????????????????????????\??????????????¨??????????????????
			if (T_Mark.equals("S")) {
				mark_num = 0;
			} else if (T_Mark.equals("H")) {
				mark_num = 1;
			} else if (T_Mark.equals("C")) {
				mark_num = 2;
			} else if (T_Mark.equals("D")) {
				mark_num = 3;
			}
			// ?????????????????°
			card_num = Integer.parseInt(strAry[1]);
			cards_Array[mark_num][card_num - 1] = 1;
		}
              //??????????????°
		for (int design_gr = 0; design_gr < Mark; design_gr++) {
			//??°???
			for (int number_gr = 0; number_gr < Num; number_gr++) {
				// ??????Array???????´??????????Array_input???????´?????????????
				if (cards_Array[design_gr][number_gr] != 1) {
					int cards_of_re = number_gr + 1;
					if (design_gr == 0) {
						System.out.println("S" + " " + cards_of_re);
					} else if (design_gr == 1) {
						System.out.println("H" + " " + cards_of_re);
					} else if (design_gr == 2) {
						System.out.println("C" + " " + cards_of_re);
					} else {
						System.out.println("D" + " " + cards_of_re);
					}

				}

			}

		}

	}//
}