import java.util.Scanner;

public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		String[] suit = {"S", "H", "C", "D"};
		int[][] cards = new int[4][13];
		int n =Integer.parseInt(input());

		for (int i = 0; i < n; i++) {

			String pattern = input();
			int number = Integer.parseInt(input());

			for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			}
		}

		for (int k = 0; k < cards.length; k++) {

			for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			}
		}

		close();

	}

	public static String input() {

		return scanner.next();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		String[] suit = {"S", "H", "C", "D"};
		int[][] cards = new int[4][13];
		int n =Integer.parseInt(input());

		for (int i = 0; i < n; i++) {

			String pattern = input();
			int number = Integer.parseInt(input());

			for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			}
		}

		for (int k = 0; k < cards.length; k++) {

			for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			}
		}

		close();

	}

	public static String input() {

		return scanner.next();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} Main public static Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) public static void main(String[] args) {

		String[] suit = {"S", "H", "C", "D"};
		int[][] cards = new int[4][13];
		int n =Integer.parseInt(input());

		for (int i = 0; i < n; i++) {

			String pattern = input();
			int number = Integer.parseInt(input());

			for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			}
		}

		for (int k = 0; k < cards.length; k++) {

			for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			}
		}

		close();

	} main {

		String[] suit = {"S", "H", "C", "D"};
		int[][] cards = new int[4][13];
		int n =Integer.parseInt(input());

		for (int i = 0; i < n; i++) {

			String pattern = input();
			int number = Integer.parseInt(input());

			for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			}
		}

		for (int k = 0; k < cards.length; k++) {

			for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			}
		}

		close();

	} String[] suit = {"S", "H", "C", "D"}; suit {"S", "H", "C", "D"} "S" "H" "C" "D" int[][] cards = new int[4][13]; cards new int[4][13] 4 13 int n =Integer.parseInt(input()); n Integer.parseInt(input()) Integer.parseInt Integer input() input for (int i = 0; i < n; i++) {

			String pattern = input();
			int number = Integer.parseInt(input());

			for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {

			String pattern = input();
			int number = Integer.parseInt(input());

			for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			}
		} {

			String pattern = input();
			int number = Integer.parseInt(input());

			for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			}
		} String pattern = input(); pattern input() input int number = Integer.parseInt(input()); number Integer.parseInt(input()) Integer.parseInt Integer input() input for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			} int j = 0; int j = 0; j 0 j < cards.length j cards.length cards cards.length j++ j++ j {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			} {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			} if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				} pattern.equals(suit[j]) pattern.equals pattern suit[j] suit j {

					cards[j][number - 1] = number;

				} cards[j][number - 1] = number cards[j][number - 1] cards[j] cards j number - 1 number 1 number for (int k = 0; k < cards.length; k++) {

			for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			}
		} int k = 0; int k = 0; k 0 k < cards.length k cards.length cards cards.length k++ k++ k {

			for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			}
		} {

			for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			}
		} for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			} int l = 0; int l = 0; l 0 l < cards[0].length l cards[0].length cards[0] cards 0 cards[0].length l++ l++ l {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			} {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			} if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				} cards[k][l] == 0 cards[k][l] cards[k] cards k l 0 {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				} System.out.print(suit[k]) System.out.print System.out System System.out suit[k] suit k System.out.print(" ") System.out.print System.out System System.out " " System.out.println(l + 1) System.out.println System.out System System.out l + 1 l 1 close() close String[] args args public static String input() {

		return scanner.next();

	} input {

		return scanner.next();

	} return scanner.next(); scanner.next() scanner.next scanner public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	} close {

		if (scanner != null) {

			scanner.close();

		}
	} if (scanner != null) {

			scanner.close();

		} scanner != null scanner null {

			scanner.close();

		} scanner.close() scanner.close scanner public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		String[] suit = {"S", "H", "C", "D"};
		int[][] cards = new int[4][13];
		int n =Integer.parseInt(input());

		for (int i = 0; i < n; i++) {

			String pattern = input();
			int number = Integer.parseInt(input());

			for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			}
		}

		for (int k = 0; k < cards.length; k++) {

			for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			}
		}

		close();

	}

	public static String input() {

		return scanner.next();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		String[] suit = {"S", "H", "C", "D"};
		int[][] cards = new int[4][13];
		int n =Integer.parseInt(input());

		for (int i = 0; i < n; i++) {

			String pattern = input();
			int number = Integer.parseInt(input());

			for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			}
		}

		for (int k = 0; k < cards.length; k++) {

			for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			}
		}

		close();

	}

	public static String input() {

		return scanner.next();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		String[] suit = {"S", "H", "C", "D"};
		int[][] cards = new int[4][13];
		int n =Integer.parseInt(input());

		for (int i = 0; i < n; i++) {

			String pattern = input();
			int number = Integer.parseInt(input());

			for (int j = 0; j < cards.length; j++) {

				if (pattern.equals(suit[j])) {

					cards[j][number - 1] = number;

				}
			}
		}

		for (int k = 0; k < cards.length; k++) {

			for (int l = 0; l < cards[0].length; l++) {

				if (cards[k][l] == 0) {

					System.out.print(suit[k]);
					System.out.print(" ");
					System.out.println(l + 1);

				}
			}
		}

		close();

	}

	public static String input() {

		return scanner.next();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
}