import java.util.*;

public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		LinkedList<String> picList = new LinkedList<>();
		LinkedList<Integer> numList = new LinkedList<>();
		
		int trpData[][] = new int[13][4];
		//???????????£??\
		for(int j = 0; j < 4; j++) {
			for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			}
		}
		
		int n = sc.nextInt();
		
		int i = 0;
		String pic = "";
		int num = 0;
		//????????°??????
		while(i < n) {
			pic = sc.next();
			num = sc.nextInt();
			if(pic.equals("S")) {
				trpData[num-1][0] = 1;
			} else if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			}
			i++;
		}
		
		//?????????????´?
		int cnt = 0;
		for(int j = 0; j < 4; j++) {
			for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			}
		}
		
		//
		for(i = 0; i < cnt; i++) {
			System.out.println(picList.get(i) + " " + numList.get(i));
		}
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		LinkedList<String> picList = new LinkedList<>();
		LinkedList<Integer> numList = new LinkedList<>();
		
		int trpData[][] = new int[13][4];
		//???????????£??\
		for(int j = 0; j < 4; j++) {
			for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			}
		}
		
		int n = sc.nextInt();
		
		int i = 0;
		String pic = "";
		int num = 0;
		//????????°??????
		while(i < n) {
			pic = sc.next();
			num = sc.nextInt();
			if(pic.equals("S")) {
				trpData[num-1][0] = 1;
			} else if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			}
			i++;
		}
		
		//?????????????´?
		int cnt = 0;
		for(int j = 0; j < 4; j++) {
			for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			}
		}
		
		//
		for(i = 0; i < cnt; i++) {
			System.out.println(picList.get(i) + " " + numList.get(i));
		}
	}
} Main public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		LinkedList<String> picList = new LinkedList<>();
		LinkedList<Integer> numList = new LinkedList<>();
		
		int trpData[][] = new int[13][4];
		//???????????£??\
		for(int j = 0; j < 4; j++) {
			for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			}
		}
		
		int n = sc.nextInt();
		
		int i = 0;
		String pic = "";
		int num = 0;
		//????????°??????
		while(i < n) {
			pic = sc.next();
			num = sc.nextInt();
			if(pic.equals("S")) {
				trpData[num-1][0] = 1;
			} else if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			}
			i++;
		}
		
		//?????????????´?
		int cnt = 0;
		for(int j = 0; j < 4; j++) {
			for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			}
		}
		
		//
		for(i = 0; i < cnt; i++) {
			System.out.println(picList.get(i) + " " + numList.get(i));
		}
	} main {
		
		Scanner sc = new Scanner(System.in);
		LinkedList<String> picList = new LinkedList<>();
		LinkedList<Integer> numList = new LinkedList<>();
		
		int trpData[][] = new int[13][4];
		//???????????£??\
		for(int j = 0; j < 4; j++) {
			for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			}
		}
		
		int n = sc.nextInt();
		
		int i = 0;
		String pic = "";
		int num = 0;
		//????????°??????
		while(i < n) {
			pic = sc.next();
			num = sc.nextInt();
			if(pic.equals("S")) {
				trpData[num-1][0] = 1;
			} else if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			}
			i++;
		}
		
		//?????????????´?
		int cnt = 0;
		for(int j = 0; j < 4; j++) {
			for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			}
		}
		
		//
		for(i = 0; i < cnt; i++) {
			System.out.println(picList.get(i) + " " + numList.get(i));
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) LinkedList<String> picList = new LinkedList<>(); picList new LinkedList<>() LinkedList<Integer> numList = new LinkedList<>(); numList new LinkedList<>() int trpData[][] = new int[13][4]; trpData new int[13][4] 13 4 for(int j = 0; j < 4; j++) {
			for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			}
		} int j = 0; int j = 0; j 0 j < 4 j 4 j++ j++ j {
			for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			}
		} {
			for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			}
		} for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			} int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
				trpData[i][j] = 0;
			} {
				trpData[i][j] = 0;
			} trpData[i][j] = 0 trpData[i][j] trpData[i] trpData i j 0 int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int i = 0; i 0 String pic = ""; pic "" int num = 0; num 0 while(i < n) {
			pic = sc.next();
			num = sc.nextInt();
			if(pic.equals("S")) {
				trpData[num-1][0] = 1;
			} else if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			}
			i++;
		} i < n i n {
			pic = sc.next();
			num = sc.nextInt();
			if(pic.equals("S")) {
				trpData[num-1][0] = 1;
			} else if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			}
			i++;
		} pic = sc.next() pic sc.next() sc.next sc num = sc.nextInt() num sc.nextInt() sc.nextInt sc if(pic.equals("S")) {
				trpData[num-1][0] = 1;
			} else if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			} pic.equals("S") pic.equals pic "S" {
				trpData[num-1][0] = 1;
			} trpData[num-1][0] = 1 trpData[num-1][0] trpData[num-1] trpData num-1 num 1 0 1 if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			} pic.equals("H") pic.equals pic "H" {
				trpData[num-1][1] = 1;
			} trpData[num-1][1] = 1 trpData[num-1][1] trpData[num-1] trpData num-1 num 1 1 1 if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			} pic.equals("C") pic.equals pic "C" {
				trpData[num-1][2] = 1;
			} trpData[num-1][2] = 1 trpData[num-1][2] trpData[num-1] trpData num-1 num 1 2 1 if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			} pic.equals("D") pic.equals pic "D" {
				trpData[num-1][3] = 1;
			} trpData[num-1][3] = 1 trpData[num-1][3] trpData[num-1] trpData num-1 num 1 3 1 i++ i int cnt = 0; cnt 0 for(int j = 0; j < 4; j++) {
			for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			}
		} int j = 0; int j = 0; j 0 j < 4 j 4 j++ j++ j {
			for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			}
		} {
			for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			}
		} for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			} i = 0; i = 0 i 0 i < 13 i 13 i++ i++ i {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			} {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			} if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				} trpData[i][j] == 0 trpData[i][j] trpData[i] trpData i j 0 {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				} if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					} j == 0 j 0 {
						picList.add("S"); 
					} picList.add("S") picList.add picList "S" if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					} j == 1 j 1 {
						picList.add("H"); 
					} picList.add("H") picList.add picList "H" if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					} j == 2 j 2 {
						picList.add("C"); 
					} picList.add("C") picList.add picList "C" if(j == 3) {
						picList.add("D");
					} j == 3 j 3 {
						picList.add("D");
					} picList.add("D") picList.add picList "D" numList.add(i+1) numList.add numList i+1 i 1 cnt++ cnt for(i = 0; i < cnt; i++) {
			System.out.println(picList.get(i) + " " + numList.get(i));
		} i = 0; i = 0 i 0 i < cnt i cnt i++ i++ i {
			System.out.println(picList.get(i) + " " + numList.get(i));
		} {
			System.out.println(picList.get(i) + " " + numList.get(i));
		} System.out.println(picList.get(i) + " " + numList.get(i)) System.out.println System.out System System.out picList.get(i) + " " + numList.get(i) picList.get(i) + " " + numList.get(i) picList.get(i) picList.get picList i " " numList.get(i) numList.get numList i String[] args args public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		LinkedList<String> picList = new LinkedList<>();
		LinkedList<Integer> numList = new LinkedList<>();
		
		int trpData[][] = new int[13][4];
		//???????????£??\
		for(int j = 0; j < 4; j++) {
			for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			}
		}
		
		int n = sc.nextInt();
		
		int i = 0;
		String pic = "";
		int num = 0;
		//????????°??????
		while(i < n) {
			pic = sc.next();
			num = sc.nextInt();
			if(pic.equals("S")) {
				trpData[num-1][0] = 1;
			} else if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			}
			i++;
		}
		
		//?????????????´?
		int cnt = 0;
		for(int j = 0; j < 4; j++) {
			for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			}
		}
		
		//
		for(i = 0; i < cnt; i++) {
			System.out.println(picList.get(i) + " " + numList.get(i));
		}
	}
} public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		LinkedList<String> picList = new LinkedList<>();
		LinkedList<Integer> numList = new LinkedList<>();
		
		int trpData[][] = new int[13][4];
		//???????????£??\
		for(int j = 0; j < 4; j++) {
			for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			}
		}
		
		int n = sc.nextInt();
		
		int i = 0;
		String pic = "";
		int num = 0;
		//????????°??????
		while(i < n) {
			pic = sc.next();
			num = sc.nextInt();
			if(pic.equals("S")) {
				trpData[num-1][0] = 1;
			} else if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			}
			i++;
		}
		
		//?????????????´?
		int cnt = 0;
		for(int j = 0; j < 4; j++) {
			for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			}
		}
		
		//
		for(i = 0; i < cnt; i++) {
			System.out.println(picList.get(i) + " " + numList.get(i));
		}
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		LinkedList<String> picList = new LinkedList<>();
		LinkedList<Integer> numList = new LinkedList<>();
		
		int trpData[][] = new int[13][4];
		//???????????£??\
		for(int j = 0; j < 4; j++) {
			for(int i = 0; i < 13; i++) {
				trpData[i][j] = 0;
			}
		}
		
		int n = sc.nextInt();
		
		int i = 0;
		String pic = "";
		int num = 0;
		//????????°??????
		while(i < n) {
			pic = sc.next();
			num = sc.nextInt();
			if(pic.equals("S")) {
				trpData[num-1][0] = 1;
			} else if(pic.equals("H")) {
				trpData[num-1][1] = 1;
			} else if(pic.equals("C")) {
				trpData[num-1][2] = 1;
			} else if(pic.equals("D")) {
				trpData[num-1][3] = 1;
			}
			i++;
		}
		
		//?????????????´?
		int cnt = 0;
		for(int j = 0; j < 4; j++) {
			for(i = 0; i < 13; i++) {
				if(trpData[i][j] == 0) {
					if(j == 0) {
						picList.add("S"); 
					} else if(j == 1) {
						picList.add("H"); 
					} else if(j == 2) {
						picList.add("C"); 
					} else if(j == 3) {
						picList.add("D");
					}
					numList.add(i+1);
					cnt++;
				}
			}
		}
		
		//
		for(i = 0; i < cnt; i++) {
			System.out.println(picList.get(i) + " " + numList.get(i));
		}
	}
}