import java.util.Scanner;

public class Main {

	final static String[] suits = {"S", "H", "C", "D"};
	final static int[] ranks = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};  
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		
		boolean[][] exist = new boolean[suits.length][ranks.length];
		int n = scan.nextInt();
		
		for (int i = 0; i < n; i++) {
			String suit = scan.next();
			int rank = scan.nextInt();
			for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			}
		}

		for (int i = 0; i < suits.length; i++) {
			for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			}
		}

		scan.close();
	}

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

	final static String[] suits = {"S", "H", "C", "D"};
	final static int[] ranks = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};  
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		
		boolean[][] exist = new boolean[suits.length][ranks.length];
		int n = scan.nextInt();
		
		for (int i = 0; i < n; i++) {
			String suit = scan.next();
			int rank = scan.nextInt();
			for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			}
		}

		for (int i = 0; i < suits.length; i++) {
			for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			}
		}

		scan.close();
	}

} Main final static String[] suits = {"S", "H", "C", "D"}; suits {"S", "H", "C", "D"} "S" "H" "C" "D" final static int[] ranks = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}; ranks {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13} 1 2 3 4 5 6 7 8 9 10 11 12 13 public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		
		boolean[][] exist = new boolean[suits.length][ranks.length];
		int n = scan.nextInt();
		
		for (int i = 0; i < n; i++) {
			String suit = scan.next();
			int rank = scan.nextInt();
			for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			}
		}

		for (int i = 0; i < suits.length; i++) {
			for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			}
		}

		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);		
		boolean[][] exist = new boolean[suits.length][ranks.length];
		int n = scan.nextInt();
		
		for (int i = 0; i < n; i++) {
			String suit = scan.next();
			int rank = scan.nextInt();
			for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			}
		}

		for (int i = 0; i < suits.length; i++) {
			for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			}
		}

		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) boolean[][] exist = new boolean[suits.length][ranks.length]; exist new boolean[suits.length][ranks.length] suits.length suits suits.length ranks.length ranks ranks.length int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan for (int i = 0; i < n; i++) {
			String suit = scan.next();
			int rank = scan.nextInt();
			for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String suit = scan.next();
			int rank = scan.nextInt();
			for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			}
		} {
			String suit = scan.next();
			int rank = scan.nextInt();
			for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			}
		} String suit = scan.next(); suit scan.next() scan.next scan int rank = scan.nextInt(); rank scan.nextInt() scan.nextInt scan for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			} int j = 0; int j = 0; j 0 j < suits.length j suits.length suits suits.length j++ j++ j {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			} {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			} if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				} suits[j].equals(suit) suits[j].equals suits[j] suits j suit {
					exist[j][rank-1] = true;
				} exist[j][rank-1] = true exist[j][rank-1] exist[j] exist j rank-1 rank 1 true for (int i = 0; i < suits.length; i++) {
			for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			}
		} int i = 0; int i = 0; i 0 i < suits.length i suits.length suits suits.length i++ i++ i {
			for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			}
		} {
			for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			}
		} for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			} int j = 0; int j = 0; j 0 j < ranks.length j ranks.length ranks ranks.length j++ j++ j {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			} {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			} if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				} !exist[i][j] exist[i][j] exist[i] exist i j {
					System.out.println(suits[i] + " " + ranks[j]);
				} System.out.println(suits[i] + " " + ranks[j]) System.out.println System.out System System.out suits[i] + " " + ranks[j] suits[i] + " " + ranks[j] suits[i] suits i " " ranks[j] ranks j scan.close() scan.close scan String[] args args public class Main {

	final static String[] suits = {"S", "H", "C", "D"};
	final static int[] ranks = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};  
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		
		boolean[][] exist = new boolean[suits.length][ranks.length];
		int n = scan.nextInt();
		
		for (int i = 0; i < n; i++) {
			String suit = scan.next();
			int rank = scan.nextInt();
			for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			}
		}

		for (int i = 0; i < suits.length; i++) {
			for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			}
		}

		scan.close();
	}

} public class Main {

	final static String[] suits = {"S", "H", "C", "D"};
	final static int[] ranks = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};  
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		
		boolean[][] exist = new boolean[suits.length][ranks.length];
		int n = scan.nextInt();
		
		for (int i = 0; i < n; i++) {
			String suit = scan.next();
			int rank = scan.nextInt();
			for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			}
		}

		for (int i = 0; i < suits.length; i++) {
			for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			}
		}

		scan.close();
	}

} Main
import java.util.Scanner;

public class Main {

	final static String[] suits = {"S", "H", "C", "D"};
	final static int[] ranks = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13};  
	
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);		
		boolean[][] exist = new boolean[suits.length][ranks.length];
		int n = scan.nextInt();
		
		for (int i = 0; i < n; i++) {
			String suit = scan.next();
			int rank = scan.nextInt();
			for (int j = 0; j < suits.length; j++) {
				if (suits[j].equals(suit)) {
					exist[j][rank-1] = true;
				}
			}
		}

		for (int i = 0; i < suits.length; i++) {
			for (int j = 0; j < ranks.length; j++) {
				if (!exist[i][j]) {
					System.out.println(suits[i] + " " + ranks[j]);
				}
			}
		}

		scan.close();
	}

}