import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		
		Map<Character, boolean[]> cardsMap = new HashMap<>();
		cardsMap.put('S', new boolean[13]);
		cardsMap.put('H', new boolean[13]);
		cardsMap.put('C', new boolean[13]);
		cardsMap.put('D', new boolean[13]);

		for (int i = 0; i < n; i++) {
			String input[] = sc.nextLine().split(" ");
			char mark = input[0].charAt(0);
			int num = Integer.parseInt(input[1]);

			cardsMap.get(mark)[num - 1] = true;
		}
		sc.close();

		char[] marks = { 'S', 'H', 'C', 'D' };
		for (char mark : marks) {
			boolean[] cards = cardsMap.get(mark);
			for (int i = 0; i < 13; i++) {

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

			}
		}
	}
} import java.util.HashMap; HashMap java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		
		Map<Character, boolean[]> cardsMap = new HashMap<>();
		cardsMap.put('S', new boolean[13]);
		cardsMap.put('H', new boolean[13]);
		cardsMap.put('C', new boolean[13]);
		cardsMap.put('D', new boolean[13]);

		for (int i = 0; i < n; i++) {
			String input[] = sc.nextLine().split(" ");
			char mark = input[0].charAt(0);
			int num = Integer.parseInt(input[1]);

			cardsMap.get(mark)[num - 1] = true;
		}
		sc.close();

		char[] marks = { 'S', 'H', 'C', 'D' };
		for (char mark : marks) {
			boolean[] cards = cardsMap.get(mark);
			for (int i = 0; i < 13; i++) {

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

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

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		
		Map<Character, boolean[]> cardsMap = new HashMap<>();
		cardsMap.put('S', new boolean[13]);
		cardsMap.put('H', new boolean[13]);
		cardsMap.put('C', new boolean[13]);
		cardsMap.put('D', new boolean[13]);

		for (int i = 0; i < n; i++) {
			String input[] = sc.nextLine().split(" ");
			char mark = input[0].charAt(0);
			int num = Integer.parseInt(input[1]);

			cardsMap.get(mark)[num - 1] = true;
		}
		sc.close();

		char[] marks = { 'S', 'H', 'C', 'D' };
		for (char mark : marks) {
			boolean[] cards = cardsMap.get(mark);
			for (int i = 0; i < 13; i++) {

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

			}
		}
	} main {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		
		Map<Character, boolean[]> cardsMap = new HashMap<>();
		cardsMap.put('S', new boolean[13]);
		cardsMap.put('H', new boolean[13]);
		cardsMap.put('C', new boolean[13]);
		cardsMap.put('D', new boolean[13]);

		for (int i = 0; i < n; i++) {
			String input[] = sc.nextLine().split(" ");
			char mark = input[0].charAt(0);
			int num = Integer.parseInt(input[1]);

			cardsMap.get(mark)[num - 1] = true;
		}
		sc.close();

		char[] marks = { 'S', 'H', 'C', 'D' };
		for (char mark : marks) {
			boolean[] cards = cardsMap.get(mark);
			for (int i = 0; i < 13; i++) {

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc Map<Character, boolean[]> cardsMap = new HashMap<>(); cardsMap new HashMap<>() cardsMap.put('S', new boolean[13]) cardsMap.put cardsMap 'S' new boolean[13] 13 cardsMap.put('H', new boolean[13]) cardsMap.put cardsMap 'H' new boolean[13] 13 cardsMap.put('C', new boolean[13]) cardsMap.put cardsMap 'C' new boolean[13] 13 cardsMap.put('D', new boolean[13]) cardsMap.put cardsMap 'D' new boolean[13] 13 for (int i = 0; i < n; i++) {
			String input[] = sc.nextLine().split(" ");
			char mark = input[0].charAt(0);
			int num = Integer.parseInt(input[1]);

			cardsMap.get(mark)[num - 1] = true;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String input[] = sc.nextLine().split(" ");
			char mark = input[0].charAt(0);
			int num = Integer.parseInt(input[1]);

			cardsMap.get(mark)[num - 1] = true;
		} {
			String input[] = sc.nextLine().split(" ");
			char mark = input[0].charAt(0);
			int num = Integer.parseInt(input[1]);

			cardsMap.get(mark)[num - 1] = true;
		} String input[] = sc.nextLine().split(" "); input sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " char mark = input[0].charAt(0); mark input[0].charAt(0) input[0].charAt input[0] input 0 0 int num = Integer.parseInt(input[1]); num Integer.parseInt(input[1]) Integer.parseInt Integer input[1] input 1 cardsMap.get(mark)[num - 1] = true cardsMap.get(mark)[num - 1] cardsMap.get(mark) cardsMap.get cardsMap mark num - 1 num 1 true sc.close() sc.close sc char[] marks = { 'S', 'H', 'C', 'D' }; marks { 'S', 'H', 'C', 'D' } 'S' 'H' 'C' 'D' for (char mark : marks) {
			boolean[] cards = cardsMap.get(mark);
			for (int i = 0; i < 13; i++) {

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

			}
		} char mark marks {
			boolean[] cards = cardsMap.get(mark);
			for (int i = 0; i < 13; i++) {

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

			}
		} {
			boolean[] cards = cardsMap.get(mark);
			for (int i = 0; i < 13; i++) {

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

			}
		} boolean[] cards = cardsMap.get(mark); cards cardsMap.get(mark) cardsMap.get cardsMap mark for (int i = 0; i < 13; i++) {

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

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

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

			} {

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

			} if (!cards[i])
					System.out.println(mark + " " + (i + 1)); !cards[i] cards[i] cards i System.out.println(mark + " " + (i + 1)) System.out.println System.out System System.out mark + " " + (i + 1) mark + " " + (i + 1) mark " " (i + 1) i 1 String[] args args
import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		sc.nextLine();
		
		Map<Character, boolean[]> cardsMap = new HashMap<>();
		cardsMap.put('S', new boolean[13]);
		cardsMap.put('H', new boolean[13]);
		cardsMap.put('C', new boolean[13]);
		cardsMap.put('D', new boolean[13]);

		for (int i = 0; i < n; i++) {
			String input[] = sc.nextLine().split(" ");
			char mark = input[0].charAt(0);
			int num = Integer.parseInt(input[1]);

			cardsMap.get(mark)[num - 1] = true;
		}
		sc.close();

		char[] marks = { 'S', 'H', 'C', 'D' };
		for (char mark : marks) {
			boolean[] cards = cardsMap.get(mark);
			for (int i = 0; i < 13; i++) {

				if (!cards[i])
					System.out.println(mark + " " + (i + 1));

			}
		}
	}
}