import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		int[][] cards = new int[4][13];
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			}	
		}
		
		String x = "";
		try {
			x = in.readLine();
			int num = Integer.parseInt(x);
			
			for (int i = 0; i < num; i++) {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			}	
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		int[][] cards = new int[4][13];
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			}	
		}
		
		String x = "";
		try {
			x = in.readLine();
			int num = Integer.parseInt(x);
			
			for (int i = 0; i < num; i++) {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			}	
		}
	}
} Main public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		int[][] cards = new int[4][13];
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			}	
		}
		
		String x = "";
		try {
			x = in.readLine();
			int num = Integer.parseInt(x);
			
			for (int i = 0; i < num; i++) {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			}	
		}
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		int[][] cards = new int[4][13];
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			}	
		}
		
		String x = "";
		try {
			x = in.readLine();
			int num = Integer.parseInt(x);
			
			for (int i = 0; i < num; i++) {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			}	
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) int[][] cards = new int[4][13]; cards new int[4][13] 4 13 for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			}	
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			}	
		} {
			for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			}	
		} for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
				cards[i][j] = 0;
			} {
				cards[i][j] = 0;
			} cards[i][j] = 0 cards[i][j] cards[i] cards i j 0 String x = ""; x "" try {
			x = in.readLine();
			int num = Integer.parseInt(x);
			
			for (int i = 0; i < num; i++) {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} NumberFormatException e {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} IOException e {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			x = in.readLine();
			int num = Integer.parseInt(x);
			
			for (int i = 0; i < num; i++) {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			}
		} x = in.readLine() x in.readLine() in.readLine in int num = Integer.parseInt(x); num Integer.parseInt(x) Integer.parseInt Integer x for (int i = 0; i < num; i++) {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			} int i = 0; int i = 0; i 0 i < num i num i++ i++ i {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			} {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			} x = in.readLine() x in.readLine() in.readLine in String[] card = x.split(" "); card x.split(" ") x.split x " " int number = (Integer.parseInt(card[1]) - 1); number (Integer.parseInt(card[1]) - 1) Integer.parseInt(card[1]) Integer.parseInt Integer card[1] card 1 1 switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				} card[0].charAt(0) card[0].charAt card[0] card 0 0 case 'S' : 'S' case 'S' : cards[0][number] = 1 cards[0][number] cards[0] cards 0 number 1 break; case 'H' : 'H' case 'H' : cards[1][number] = 1 cards[1][number] cards[1] cards 1 number 1 break; case 'C' : 'C' case 'C' : cards[2][number] = 1 cards[2][number] cards[2] cards 2 number 1 break; case 'D' : 'D' case 'D' : cards[3][number] = 1 cards[3][number] cards[3] cards 3 number 1 break; for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			}	
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			}	
		} {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			}	
		} for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			} {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			} if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				} cards[i][j] == 0 cards[i][j] cards[i] cards i j 0 {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				} switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					} i case 0 : 0 case 0 : System.out.println("S " + (j + 1)) System.out.println System.out System System.out "S " + (j + 1) "S " (j + 1) j 1 break; case 1 : 1 case 1 : System.out.println("H " + (j + 1)) System.out.println System.out System System.out "H " + (j + 1) "H " (j + 1) j 1 break; case 2 : 2 case 2 : System.out.println("C " + (j + 1)) System.out.println System.out System System.out "C " + (j + 1) "C " (j + 1) j 1 break; case 3 : 3 case 3 : System.out.println("D " + (j + 1)) System.out.println System.out System System.out "D " + (j + 1) "D " (j + 1) j 1 break; String[] args args public class Main {
	
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		int[][] cards = new int[4][13];
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			}	
		}
		
		String x = "";
		try {
			x = in.readLine();
			int num = Integer.parseInt(x);
			
			for (int i = 0; i < num; i++) {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			}	
		}
	}
} public class Main {
	
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		int[][] cards = new int[4][13];
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			}	
		}
		
		String x = "";
		try {
			x = in.readLine();
			int num = Integer.parseInt(x);
			
			for (int i = 0; i < num; i++) {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			}	
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	
	public static void main(String[] args) {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));

		int[][] cards = new int[4][13];
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				cards[i][j] = 0;
			}	
		}
		
		String x = "";
		try {
			x = in.readLine();
			int num = Integer.parseInt(x);
			
			for (int i = 0; i < num; i++) {
				x = in.readLine();
				String[] card = x.split(" ");

				int number = (Integer.parseInt(card[1]) - 1);
				switch (card[0].charAt(0)) {
				case 'S' :
					cards[0][number] = 1;
					break;
				case 'H' :
					cards[1][number] = 1;
					break;
				case 'C' :
					cards[2][number] = 1;
					break;
				case 'D' :
					cards[3][number] = 1;
					break;
				}
			}
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
		for (int i = 0; i < 4; i++) {
			for (int j = 0; j < 13; j++) {
				if (cards[i][j] == 0) {
					switch (i) {
					case 0 :
						System.out.println("S " + (j + 1));
						break;
					case 1 :
						System.out.println("H " + (j + 1));
						break;
					case 2 :
						System.out.println("C " + (j + 1));
						break;
					case 3 :
						System.out.println("D " + (j + 1));
						break;
					}
				}
			}	
		}
	}
}