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

public class Main {
	
	public static void main(String[] args) {
		try {
			boolean[][] cards = new boolean[4][13];
			
			for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			}

			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String s = reader.readLine();
				
			int n = Integer.parseInt(s);
			String[] trump;
			int num = 0;
			for (int k = 0; k < n; k++) {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			}
			
			String[] picture = {"S", "H", "C", "D"};
			
			for (int l = 0; l < 4; l++) {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			}
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

} 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) {
		try {
			boolean[][] cards = new boolean[4][13];
			
			for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			}

			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String s = reader.readLine();
				
			int n = Integer.parseInt(s);
			String[] trump;
			int num = 0;
			for (int k = 0; k < n; k++) {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			}
			
			String[] picture = {"S", "H", "C", "D"};
			
			for (int l = 0; l < 4; l++) {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			}
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

} Main public static void main(String[] args) {
		try {
			boolean[][] cards = new boolean[4][13];
			
			for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			}

			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String s = reader.readLine();
				
			int n = Integer.parseInt(s);
			String[] trump;
			int num = 0;
			for (int k = 0; k < n; k++) {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			}
			
			String[] picture = {"S", "H", "C", "D"};
			
			for (int l = 0; l < 4; l++) {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			}
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	} main {
		try {
			boolean[][] cards = new boolean[4][13];
			
			for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			}

			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String s = reader.readLine();
				
			int n = Integer.parseInt(s);
			String[] trump;
			int num = 0;
			for (int k = 0; k < n; k++) {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			}
			
			String[] picture = {"S", "H", "C", "D"};
			
			for (int l = 0; l < 4; l++) {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			}
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	} try {
			boolean[][] cards = new boolean[4][13];
			
			for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			}

			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String s = reader.readLine();
				
			int n = Integer.parseInt(s);
			String[] trump;
			int num = 0;
			for (int k = 0; k < n; k++) {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			}
			
			String[] picture = {"S", "H", "C", "D"};
			
			for (int l = 0; l < 4; l++) {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			}
			
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			boolean[][] cards = new boolean[4][13];
			
			for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			}

			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String s = reader.readLine();
				
			int n = Integer.parseInt(s);
			String[] trump;
			int num = 0;
			for (int k = 0; k < n; k++) {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			}
			
			String[] picture = {"S", "H", "C", "D"};
			
			for (int l = 0; l < 4; l++) {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			}
			
		} boolean[][] cards = new boolean[4][13]; cards new boolean[4][13] 4 13 for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			} 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] = false;
				}
			} {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			} for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
					cards[i][j] = false;
				} {
					cards[i][j] = false;
				} cards[i][j] = false cards[i][j] cards[i] cards i j false BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String s = reader.readLine(); s reader.readLine() reader.readLine reader int n = Integer.parseInt(s); n Integer.parseInt(s) Integer.parseInt Integer s String[] trump; trump int num = 0; num 0 for (int k = 0; k < n; k++) {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			} int k = 0; int k = 0; k 0 k < n k n k++ k++ k {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			} {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			} String t = reader.readLine(); t reader.readLine() reader.readLine reader trump = t.split(" ") trump t.split(" ") t.split t " " num = Integer.parseInt(trump[1]) num Integer.parseInt(trump[1]) Integer.parseInt Integer trump[1] trump 1 if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				} "S".equals(trump[0]) "S".equals "S" trump[0] trump 0 {
					cards[0][num - 1] = true;
				} cards[0][num - 1] = true cards[0][num - 1] cards[0] cards 0 num - 1 num 1 true if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				} "H".equals(trump[0]) "H".equals "H" trump[0] trump 0 {
					cards[1][num - 1] = true;
				} cards[1][num - 1] = true cards[1][num - 1] cards[1] cards 1 num - 1 num 1 true if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				} "C".equals(trump[0]) "C".equals "C" trump[0] trump 0 {
					cards[2][num - 1] = true;
				} cards[2][num - 1] = true cards[2][num - 1] cards[2] cards 2 num - 1 num 1 true if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				} "D".equals(trump[0]) "D".equals "D" trump[0] trump 0 {
					cards[3][num - 1] = true;
				} cards[3][num - 1] = true cards[3][num - 1] cards[3] cards 3 num - 1 num 1 true String[] picture = {"S", "H", "C", "D"}; picture {"S", "H", "C", "D"} "S" "H" "C" "D" for (int l = 0; l < 4; l++) {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			} int l = 0; int l = 0; l 0 l < 4 l 4 l++ l++ l {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			} {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			} for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				} int m = 0; int m = 0; m 0 m < 13 m 13 m++ m++ m {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				} {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				} if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					} !cards[l][m] cards[l][m] cards[l] cards l m {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					} System.out.print(picture[l] + " ") System.out.print System.out System System.out picture[l] + " " picture[l] picture l " " System.out.println(m + 1) System.out.println System.out System System.out m + 1 m 1 String[] args args public class Main {
	
	public static void main(String[] args) {
		try {
			boolean[][] cards = new boolean[4][13];
			
			for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			}

			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String s = reader.readLine();
				
			int n = Integer.parseInt(s);
			String[] trump;
			int num = 0;
			for (int k = 0; k < n; k++) {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			}
			
			String[] picture = {"S", "H", "C", "D"};
			
			for (int l = 0; l < 4; l++) {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			}
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

} public class Main {
	
	public static void main(String[] args) {
		try {
			boolean[][] cards = new boolean[4][13];
			
			for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			}

			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String s = reader.readLine();
				
			int n = Integer.parseInt(s);
			String[] trump;
			int num = 0;
			for (int k = 0; k < n; k++) {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			}
			
			String[] picture = {"S", "H", "C", "D"};
			
			for (int l = 0; l < 4; l++) {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			}
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

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

public class Main {
	
	public static void main(String[] args) {
		try {
			boolean[][] cards = new boolean[4][13];
			
			for (int i = 0; i < 4; i++) {
				for (int j = 0; j < 13; j++) {
					cards[i][j] = false;
				}
			}

			BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
			String s = reader.readLine();
				
			int n = Integer.parseInt(s);
			String[] trump;
			int num = 0;
			for (int k = 0; k < n; k++) {
				String t = reader.readLine();
				trump = t.split(" ");
				num = Integer.parseInt(trump[1]);
				if ("S".equals(trump[0])) {
					cards[0][num - 1] = true;
				} else if ("H".equals(trump[0])) {
					cards[1][num - 1] = true;
				} else if ("C".equals(trump[0])) {
					cards[2][num - 1] = true;
				} else if ("D".equals(trump[0])) {
					cards[3][num - 1] = true;
				}
			}
			
			String[] picture = {"S", "H", "C", "D"};
			
			for (int l = 0; l < 4; l++) {
				for (int m = 0; m < 13; m++) {
					if (!cards[l][m]) {
						System.out.print(picture[l] + " ");
						System.out.println(m + 1);
					}
				}
			}
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}