import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		
		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int n = Integer.parseInt(line1);
		
		String[] cards = new String[n];
		for (int i = 0; i < cards.length; i++) {
			String c = sc.nextLine();
			cards[i] = c;
		}
		
		String[] suit = {"S","H","C","D"};
		
		for (int i = 0; i < 4; i++) {
			for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			}
		}
	}

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

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		
		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int n = Integer.parseInt(line1);
		
		String[] cards = new String[n];
		for (int i = 0; i < cards.length; i++) {
			String c = sc.nextLine();
			cards[i] = c;
		}
		
		String[] suit = {"S","H","C","D"};
		
		for (int i = 0; i < 4; i++) {
			for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			}
		}
	}

} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		
		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int n = Integer.parseInt(line1);
		
		String[] cards = new String[n];
		for (int i = 0; i < cards.length; i++) {
			String c = sc.nextLine();
			cards[i] = c;
		}
		
		String[] suit = {"S","H","C","D"};
		
		for (int i = 0; i < 4; i++) {
			for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			}
		}
	} main {
		// TODO ?????????????????????????????????????????????
		
		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int n = Integer.parseInt(line1);
		
		String[] cards = new String[n];
		for (int i = 0; i < cards.length; i++) {
			String c = sc.nextLine();
			cards[i] = c;
		}
		
		String[] suit = {"S","H","C","D"};
		
		for (int i = 0; i < 4; i++) {
			for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			}
		}
	} 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[] cards = new String[n]; cards new String[n] n for (int i = 0; i < cards.length; i++) {
			String c = sc.nextLine();
			cards[i] = c;
		} int i = 0; int i = 0; i 0 i < cards.length i cards.length cards cards.length i++ i++ i {
			String c = sc.nextLine();
			cards[i] = c;
		} {
			String c = sc.nextLine();
			cards[i] = c;
		} String c = sc.nextLine(); c sc.nextLine() sc.nextLine sc cards[i] = c cards[i] cards i c String[] suit = {"S","H","C","D"}; suit {"S","H","C","D"} "S" "H" "C" "D" for (int i = 0; i < 4; i++) {
			for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			}
		} {
			for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			}
		} for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			} int j = 1 ; int j = 1 ; j 1 j <= 13 j 13 j++ j++ j {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			} {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			} StringBuilder card = new StringBuilder(); card new StringBuilder() card.append(suit[i]) card.append card suit[i] suit i card.append(" ") card.append card " " String js = String.valueOf(j); js String.valueOf(j) String.valueOf String j card.append(js) card.append card js String str = card.toString(); str card.toString() card.toString card if (Arrays.asList(cards).contains(str)) {
					continue;
				} Arrays.asList(cards).contains(str) Arrays.asList(cards).contains Arrays.asList(cards) Arrays.asList Arrays cards str {
					continue;
				} continue; System.out.println(card) System.out.println System.out System System.out card String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		
		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int n = Integer.parseInt(line1);
		
		String[] cards = new String[n];
		for (int i = 0; i < cards.length; i++) {
			String c = sc.nextLine();
			cards[i] = c;
		}
		
		String[] suit = {"S","H","C","D"};
		
		for (int i = 0; i < 4; i++) {
			for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			}
		}
	}

} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		
		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int n = Integer.parseInt(line1);
		
		String[] cards = new String[n];
		for (int i = 0; i < cards.length; i++) {
			String c = sc.nextLine();
			cards[i] = c;
		}
		
		String[] suit = {"S","H","C","D"};
		
		for (int i = 0; i < 4; i++) {
			for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			}
		}
	}

} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		
		Scanner sc = new Scanner(System.in);
		String line1 = sc.nextLine();
		int n = Integer.parseInt(line1);
		
		String[] cards = new String[n];
		for (int i = 0; i < cards.length; i++) {
			String c = sc.nextLine();
			cards[i] = c;
		}
		
		String[] suit = {"S","H","C","D"};
		
		for (int i = 0; i < 4; i++) {
			for (int j = 1 ; j <= 13; j++) {
				StringBuilder card = new StringBuilder();
				card.append(suit[i]);
				card.append(" ");
				String js = String.valueOf(j);
				card.append(js);
				String str = card.toString();
				if (Arrays.asList(cards).contains(str)) {
					continue;
				}
				System.out.println(card);
			}
		}
	}

}