import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class Main {

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int amount = 0;
		int count = 0;
		List<Integer> S = new ArrayList<Integer>();
		List<Integer> H = new ArrayList<Integer>();
		List<Integer> C = new ArrayList<Integer>();
		List<Integer> D = new ArrayList<Integer>();
		try {
			while ((buffer = reader.readLine())  != null) {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util public class Main {

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int amount = 0;
		int count = 0;
		List<Integer> S = new ArrayList<Integer>();
		List<Integer> H = new ArrayList<Integer>();
		List<Integer> C = new ArrayList<Integer>();
		List<Integer> D = new ArrayList<Integer>();
		try {
			while ((buffer = reader.readLine())  != null) {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
} Main public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int amount = 0;
		int count = 0;
		List<Integer> S = new ArrayList<Integer>();
		List<Integer> H = new ArrayList<Integer>();
		List<Integer> C = new ArrayList<Integer>();
		List<Integer> D = new ArrayList<Integer>();
		try {
			while ((buffer = reader.readLine())  != null) {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	} main {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int amount = 0;
		int count = 0;
		List<Integer> S = new ArrayList<Integer>();
		List<Integer> H = new ArrayList<Integer>();
		List<Integer> C = new ArrayList<Integer>();
		List<Integer> D = new ArrayList<Integer>();
		try {
			while ((buffer = reader.readLine())  != null) {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	} BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String buffer; buffer int amount = 0; amount 0 int count = 0; count 0 List<Integer> S = new ArrayList<Integer>(); S new ArrayList<Integer>() List<Integer> H = new ArrayList<Integer>(); H new ArrayList<Integer>() List<Integer> C = new ArrayList<Integer>(); C new ArrayList<Integer>() List<Integer> D = new ArrayList<Integer>(); D new ArrayList<Integer>() try {
			while ((buffer = reader.readLine())  != null) {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		} catch (Exception ex) {
			ex.printStackTrace();
		} Exception ex {
			ex.printStackTrace();
		} ex.printStackTrace() ex.printStackTrace ex {
			while ((buffer = reader.readLine())  != null) {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			}
		} while ((buffer = reader.readLine())  != null) {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			} (buffer = reader.readLine())  != null (buffer = reader.readLine()) buffer reader.readLine() reader.readLine reader null {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			} if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				} amount == 0 amount 0 {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				} amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "))) amount Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "))) Integer.valueOf Integer buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")) buffer.substring buffer 0 buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ") buffer.indexOf(" ") == -1 buffer.indexOf(" ") buffer.indexOf buffer " " -1 1 buffer.length() buffer.length buffer buffer.indexOf(" ") buffer.indexOf buffer " " {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				} String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")); card buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")) buffer.substring buffer 0 buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ") buffer.indexOf(" ") == -1 buffer.indexOf(" ") buffer.indexOf buffer " " -1 1 buffer.length() buffer.length buffer buffer.indexOf(" ") buffer.indexOf buffer " " buffer = buffer.substring(buffer.indexOf(" ") + 1) buffer buffer.substring(buffer.indexOf(" ") + 1) buffer.substring buffer buffer.indexOf(" ") + 1 buffer.indexOf(" ") buffer.indexOf buffer " " 1 int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "))); number Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "))) Integer.valueOf Integer buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")) buffer.substring buffer 0 buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ") buffer.indexOf(" ") == -1 buffer.indexOf(" ") buffer.indexOf buffer " " -1 1 buffer.length() buffer.length buffer buffer.indexOf(" ") buffer.indexOf buffer " " switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					} card case ("S") : ("S") case ("S") : {
						S.add(number);
						break;
					} S.add(number) S.add S number break; case ("H") : ("H") case ("H") : {
						H.add(number);
						break;
					} H.add(number) H.add H number break; case ("C") : ("C") case ("C") : {
						C.add(number);
						break;
					} C.add(number) C.add C number break; case ("D") : ("D") case ("D") : {
						D.add(number);
						break;
					} D.add(number) D.add D number break; if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					} ++count == amount ++count count amount {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					} for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						} int s = 1; int s = 1; s 1 s <= 13 s 13 s++ s++ s {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						} {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						} if (!S.contains(s)) {
								System.out.println("S " + s);
							} !S.contains(s) S.contains(s) S.contains S s {
								System.out.println("S " + s);
							} System.out.println("S " + s) System.out.println System.out System System.out "S " + s "S " s for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						} int h = 1; int h = 1; h 1 h <= 13 h 13 h++ h++ h {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						} {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						} if (!H.contains(h)) {
								System.out.println("H " + h);
							} !H.contains(h) H.contains(h) H.contains H h {
								System.out.println("H " + h);
							} System.out.println("H " + h) System.out.println System.out System System.out "H " + h "H " h for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						} int c = 1; int c = 1; c 1 c <= 13 c 13 c++ c++ c {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						} {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						} if (!C.contains(c)) {
								System.out.println("C " + c);
							} !C.contains(c) C.contains(c) C.contains C c {
								System.out.println("C " + c);
							} System.out.println("C " + c) System.out.println System.out System System.out "C " + c "C " c for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						} int d = 1; int d = 1; d 1 d <= 13 d 13 d++ d++ d {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						} {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						} if (!D.contains(d)) {
								System.out.println("D " + d);
							} !D.contains(d) D.contains(d) D.contains D d {
								System.out.println("D " + d);
							} System.out.println("D " + d) System.out.println System.out System System.out "D " + d "D " d String[] args args public class Main {

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int amount = 0;
		int count = 0;
		List<Integer> S = new ArrayList<Integer>();
		List<Integer> H = new ArrayList<Integer>();
		List<Integer> C = new ArrayList<Integer>();
		List<Integer> D = new ArrayList<Integer>();
		try {
			while ((buffer = reader.readLine())  != null) {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
} public class Main {

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int amount = 0;
		int count = 0;
		List<Integer> S = new ArrayList<Integer>();
		List<Integer> H = new ArrayList<Integer>();
		List<Integer> C = new ArrayList<Integer>();
		List<Integer> D = new ArrayList<Integer>();
		try {
			while ((buffer = reader.readLine())  != null) {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

public class Main {

	public static void main(String[] args) {
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
		String buffer;
		int amount = 0;
		int count = 0;
		List<Integer> S = new ArrayList<Integer>();
		List<Integer> H = new ArrayList<Integer>();
		List<Integer> C = new ArrayList<Integer>();
		List<Integer> D = new ArrayList<Integer>();
		try {
			while ((buffer = reader.readLine())  != null) {
				if (amount == 0) {
					amount = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
				}
				else {
					String card = buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" "));
					buffer = buffer.substring(buffer.indexOf(" ") + 1);
					int number = Integer.valueOf(buffer.substring(0, buffer.indexOf(" ") == -1 ? buffer.length() : buffer.indexOf(" ")));
					switch (card) {
					case ("S") : {
						S.add(number);
						break;
					}
					case ("H") : {
						H.add(number);
						break;
					}
					case ("C") : {
						C.add(number);
						break;
					}
					case ("D") : {
						D.add(number);
						break;
					}
					}
					if (++count == amount) {
						for (int s = 1; s <= 13; s++) {
							if (!S.contains(s)) {
								System.out.println("S " + s);
							}
						}
						for (int h = 1; h <= 13; h++) {
							if (!H.contains(h)) {
								System.out.println("H " + h);
							}
						}
						for (int c = 1; c <= 13; c++) {
							if (!C.contains(c)) {
								System.out.println("C " + c);
							}
						}
						for (int d = 1; d <= 13; d++) {
							if (!D.contains(d)) {
								System.out.println("D " + d);
							}
						}
					}
				}
			}
		} catch (Exception ex) {
			ex.printStackTrace();
		}
	}
}