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

public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		boolean[][] card = new boolean[4][13];
		String markList[] = { "S", "H", "C", "D" };
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i = 0; i < n; i++) {
			String[] cardTemp = br.readLine().split(" ");
			int mark = 0;
			switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			}
			int number = Integer.parseInt(cardTemp[1]);

			card[mark][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			}
		}
	}

} 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 NumberFormatException, IOException {
		boolean[][] card = new boolean[4][13];
		String markList[] = { "S", "H", "C", "D" };
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i = 0; i < n; i++) {
			String[] cardTemp = br.readLine().split(" ");
			int mark = 0;
			switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			}
			int number = Integer.parseInt(cardTemp[1]);

			card[mark][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			}
		}
	}

} Main public static void main(String[] args) throws NumberFormatException, IOException {
		boolean[][] card = new boolean[4][13];
		String markList[] = { "S", "H", "C", "D" };
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i = 0; i < n; i++) {
			String[] cardTemp = br.readLine().split(" ");
			int mark = 0;
			switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			}
			int number = Integer.parseInt(cardTemp[1]);

			card[mark][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			}
		}
	} main {
		boolean[][] card = new boolean[4][13];
		String markList[] = { "S", "H", "C", "D" };
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i = 0; i < n; i++) {
			String[] cardTemp = br.readLine().split(" ");
			int mark = 0;
			switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			}
			int number = Integer.parseInt(cardTemp[1]);

			card[mark][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			}
		}
	} boolean[][] card = new boolean[4][13]; card new boolean[4][13] 4 13 String markList[] = { "S", "H", "C", "D" }; markList { "S", "H", "C", "D" } "S" "H" "C" "D" BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for (int i = 0; i < n; i++) {
			String[] cardTemp = br.readLine().split(" ");
			int mark = 0;
			switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			}
			int number = Integer.parseInt(cardTemp[1]);

			card[mark][number - 1] = true;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String[] cardTemp = br.readLine().split(" ");
			int mark = 0;
			switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			}
			int number = Integer.parseInt(cardTemp[1]);

			card[mark][number - 1] = true;
		} {
			String[] cardTemp = br.readLine().split(" ");
			int mark = 0;
			switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			}
			int number = Integer.parseInt(cardTemp[1]);

			card[mark][number - 1] = true;
		} String[] cardTemp = br.readLine().split(" "); cardTemp br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int mark = 0; mark 0 switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			} cardTemp[0] cardTemp 0 case "S": "S" case "S": mark = 0 mark 0 break; case "H": "H" case "H": mark = 1 mark 1 break; case "C": "C" case "C": mark = 2 mark 2 break; case "D": "D" case "D": mark = 3 mark 3 break; int number = Integer.parseInt(cardTemp[1]); number Integer.parseInt(cardTemp[1]) Integer.parseInt Integer cardTemp[1] cardTemp 1 card[mark][number - 1] = true card[mark][number - 1] card[mark] card mark number - 1 number 1 true for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (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) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			}
		} {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			}
		} for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			} {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			} if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				} card[i][j] == false card[i][j] card[i] card i j false {
					System.out.println(markList[i] + " " + (j + 1));
				} System.out.println(markList[i] + " " + (j + 1)) System.out.println System.out System System.out markList[i] + " " + (j + 1) markList[i] + " " + (j + 1) markList[i] markList i " " (j + 1) j 1 String[] args args public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		boolean[][] card = new boolean[4][13];
		String markList[] = { "S", "H", "C", "D" };
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i = 0; i < n; i++) {
			String[] cardTemp = br.readLine().split(" ");
			int mark = 0;
			switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			}
			int number = Integer.parseInt(cardTemp[1]);

			card[mark][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			}
		}
	}

} public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		boolean[][] card = new boolean[4][13];
		String markList[] = { "S", "H", "C", "D" };
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i = 0; i < n; i++) {
			String[] cardTemp = br.readLine().split(" ");
			int mark = 0;
			switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			}
			int number = Integer.parseInt(cardTemp[1]);

			card[mark][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			}
		}
	}

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

public class Main {
	public static void main(String[] args) throws NumberFormatException, IOException {
		boolean[][] card = new boolean[4][13];
		String markList[] = { "S", "H", "C", "D" };
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());

		for (int i = 0; i < n; i++) {
			String[] cardTemp = br.readLine().split(" ");
			int mark = 0;
			switch (cardTemp[0]) {
			case "S":
				mark = 0;
				break;
			case "H":
				mark = 1;
				break;
			case "C":
				mark = 2;
				break;
			case "D":
				mark = 3;
				break;
			}
			int number = Integer.parseInt(cardTemp[1]);

			card[mark][number - 1] = true;
		}

		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (card[i][j] == false) {
					System.out.println(markList[i] + " " + (j + 1));
				}
			}
		}
	}

}