import java.util.Hashtable;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		Hashtable<String, int[]> card = new Hashtable<String, int[]>();

		String[] priority = {"S", "H", "C", "D"};

		int[] s = new int[13];
		card.put("S", s);
		int[] h = new int[13];
		card.put("H", h);
		int[] c = new int[13];
		card.put("C", c);
		int[] d = new int[13];
		card.put("D", d);

		for(int i = 0; i < n; i++) {
			String name = scan.next();
			int value = scan.nextInt();
			card.get(name)[value - 1] = -1;
		}

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

		scan.close();
	}
} import java.util.Hashtable; Hashtable java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		Hashtable<String, int[]> card = new Hashtable<String, int[]>();

		String[] priority = {"S", "H", "C", "D"};

		int[] s = new int[13];
		card.put("S", s);
		int[] h = new int[13];
		card.put("H", h);
		int[] c = new int[13];
		card.put("C", c);
		int[] d = new int[13];
		card.put("D", d);

		for(int i = 0; i < n; i++) {
			String name = scan.next();
			int value = scan.nextInt();
			card.get(name)[value - 1] = -1;
		}

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

		scan.close();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		Hashtable<String, int[]> card = new Hashtable<String, int[]>();

		String[] priority = {"S", "H", "C", "D"};

		int[] s = new int[13];
		card.put("S", s);
		int[] h = new int[13];
		card.put("H", h);
		int[] c = new int[13];
		card.put("C", c);
		int[] d = new int[13];
		card.put("D", d);

		for(int i = 0; i < n; i++) {
			String name = scan.next();
			int value = scan.nextInt();
			card.get(name)[value - 1] = -1;
		}

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

		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		Hashtable<String, int[]> card = new Hashtable<String, int[]>();

		String[] priority = {"S", "H", "C", "D"};

		int[] s = new int[13];
		card.put("S", s);
		int[] h = new int[13];
		card.put("H", h);
		int[] c = new int[13];
		card.put("C", c);
		int[] d = new int[13];
		card.put("D", d);

		for(int i = 0; i < n; i++) {
			String name = scan.next();
			int value = scan.nextInt();
			card.get(name)[value - 1] = -1;
		}

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

		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan Hashtable<String, int[]> card = new Hashtable<String, int[]>(); card new Hashtable<String, int[]>() String[] priority = {"S", "H", "C", "D"}; priority {"S", "H", "C", "D"} "S" "H" "C" "D" int[] s = new int[13]; s new int[13] 13 card.put("S", s) card.put card "S" s int[] h = new int[13]; h new int[13] 13 card.put("H", h) card.put card "H" h int[] c = new int[13]; c new int[13] 13 card.put("C", c) card.put card "C" c int[] d = new int[13]; d new int[13] 13 card.put("D", d) card.put card "D" d for(int i = 0; i < n; i++) {
			String name = scan.next();
			int value = scan.nextInt();
			card.get(name)[value - 1] = -1;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String name = scan.next();
			int value = scan.nextInt();
			card.get(name)[value - 1] = -1;
		} {
			String name = scan.next();
			int value = scan.nextInt();
			card.get(name)[value - 1] = -1;
		} String name = scan.next(); name scan.next() scan.next scan int value = scan.nextInt(); value scan.nextInt() scan.nextInt scan card.get(name)[value - 1] = -1 card.get(name)[value - 1] card.get(name) card.get card name value - 1 value 1 -1 1 for(int i = 0; i < 4; i++) {
			for(int j = 0; j < 13; j++) {
				if(card.get(priority[i])[j] == 0) {
					System.out.println(priority[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.get(priority[i])[j] == 0) {
					System.out.println(priority[i] + " " + (j + 1));
				}
			}
		} {
			for(int j = 0; j < 13; j++) {
				if(card.get(priority[i])[j] == 0) {
					System.out.println(priority[i] + " " + (j + 1));
				}
			}
		} for(int j = 0; j < 13; j++) {
				if(card.get(priority[i])[j] == 0) {
					System.out.println(priority[i] + " " + (j + 1));
				}
			} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
				if(card.get(priority[i])[j] == 0) {
					System.out.println(priority[i] + " " + (j + 1));
				}
			} {
				if(card.get(priority[i])[j] == 0) {
					System.out.println(priority[i] + " " + (j + 1));
				}
			} if(card.get(priority[i])[j] == 0) {
					System.out.println(priority[i] + " " + (j + 1));
				} card.get(priority[i])[j] == 0 card.get(priority[i])[j] card.get(priority[i]) card.get card priority[i] priority i j 0 {
					System.out.println(priority[i] + " " + (j + 1));
				} System.out.println(priority[i] + " " + (j + 1)) System.out.println System.out System System.out priority[i] + " " + (j + 1) priority[i] + " " + (j + 1) priority[i] priority i " " (j + 1) j 1 scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		Hashtable<String, int[]> card = new Hashtable<String, int[]>();

		String[] priority = {"S", "H", "C", "D"};

		int[] s = new int[13];
		card.put("S", s);
		int[] h = new int[13];
		card.put("H", h);
		int[] c = new int[13];
		card.put("C", c);
		int[] d = new int[13];
		card.put("D", d);

		for(int i = 0; i < n; i++) {
			String name = scan.next();
			int value = scan.nextInt();
			card.get(name)[value - 1] = -1;
		}

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

		scan.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		Hashtable<String, int[]> card = new Hashtable<String, int[]>();

		String[] priority = {"S", "H", "C", "D"};

		int[] s = new int[13];
		card.put("S", s);
		int[] h = new int[13];
		card.put("H", h);
		int[] c = new int[13];
		card.put("C", c);
		int[] d = new int[13];
		card.put("D", d);

		for(int i = 0; i < n; i++) {
			String name = scan.next();
			int value = scan.nextInt();
			card.get(name)[value - 1] = -1;
		}

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

		scan.close();
	}
} Main
import java.util.Hashtable;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();

		Hashtable<String, int[]> card = new Hashtable<String, int[]>();

		String[] priority = {"S", "H", "C", "D"};

		int[] s = new int[13];
		card.put("S", s);
		int[] h = new int[13];
		card.put("H", h);
		int[] c = new int[13];
		card.put("C", c);
		int[] d = new int[13];
		card.put("D", d);

		for(int i = 0; i < n; i++) {
			String name = scan.next();
			int value = scan.nextInt();
			card.get(name)[value - 1] = -1;
		}

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

		scan.close();
	}
}
