import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

class Main {

	public static void main(String[] args) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			Map<String, List<Integer>> map = new LinkedHashMap<String, List<Integer>>();
			List<Integer> list = new ArrayList<Integer>();
			map.put("S", new ArrayList<Integer>());
			map.put("H", new ArrayList<Integer>());
			map.put("C", new ArrayList<Integer>());
			map.put("D", new ArrayList<Integer>());
			String input = br.readLine();
			int sheet = Integer.parseInt(input);
			int i;
			for (i = 0; i < sheet; i++) {
				String[] inputList = br.readLine().split(" ");
				list = map.get(inputList[0]);
				list.add(Integer.parseInt(inputList[1]));
				map.put(inputList[0], list);
			}

			for (Map.Entry<String, List<Integer>> e : map.entrySet()) {
				list = e.getValue();
				for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				}
			}
		} 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 import java.util.ArrayList; ArrayList java.util import java.util.LinkedHashMap; LinkedHashMap java.util import java.util.List; List java.util import java.util.Map; Map java.util class Main {

	public static void main(String[] args) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			Map<String, List<Integer>> map = new LinkedHashMap<String, List<Integer>>();
			List<Integer> list = new ArrayList<Integer>();
			map.put("S", new ArrayList<Integer>());
			map.put("H", new ArrayList<Integer>());
			map.put("C", new ArrayList<Integer>());
			map.put("D", new ArrayList<Integer>());
			String input = br.readLine();
			int sheet = Integer.parseInt(input);
			int i;
			for (i = 0; i < sheet; i++) {
				String[] inputList = br.readLine().split(" ");
				list = map.get(inputList[0]);
				list.add(Integer.parseInt(inputList[1]));
				map.put(inputList[0], list);
			}

			for (Map.Entry<String, List<Integer>> e : map.entrySet()) {
				list = e.getValue();
				for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} Main public static void main(String[] args) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			Map<String, List<Integer>> map = new LinkedHashMap<String, List<Integer>>();
			List<Integer> list = new ArrayList<Integer>();
			map.put("S", new ArrayList<Integer>());
			map.put("H", new ArrayList<Integer>());
			map.put("C", new ArrayList<Integer>());
			map.put("D", new ArrayList<Integer>());
			String input = br.readLine();
			int sheet = Integer.parseInt(input);
			int i;
			for (i = 0; i < sheet; i++) {
				String[] inputList = br.readLine().split(" ");
				list = map.get(inputList[0]);
				list.add(Integer.parseInt(inputList[1]));
				map.put(inputList[0], list);
			}

			for (Map.Entry<String, List<Integer>> e : map.entrySet()) {
				list = e.getValue();
				for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	} main {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			Map<String, List<Integer>> map = new LinkedHashMap<String, List<Integer>>();
			List<Integer> list = new ArrayList<Integer>();
			map.put("S", new ArrayList<Integer>());
			map.put("H", new ArrayList<Integer>());
			map.put("C", new ArrayList<Integer>());
			map.put("D", new ArrayList<Integer>());
			String input = br.readLine();
			int sheet = Integer.parseInt(input);
			int i;
			for (i = 0; i < sheet; i++) {
				String[] inputList = br.readLine().split(" ");
				list = map.get(inputList[0]);
				list.add(Integer.parseInt(inputList[1]));
				map.put(inputList[0], list);
			}

			for (Map.Entry<String, List<Integer>> e : map.entrySet()) {
				list = e.getValue();
				for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) try {
			Map<String, List<Integer>> map = new LinkedHashMap<String, List<Integer>>();
			List<Integer> list = new ArrayList<Integer>();
			map.put("S", new ArrayList<Integer>());
			map.put("H", new ArrayList<Integer>());
			map.put("C", new ArrayList<Integer>());
			map.put("D", new ArrayList<Integer>());
			String input = br.readLine();
			int sheet = Integer.parseInt(input);
			int i;
			for (i = 0; i < sheet; i++) {
				String[] inputList = br.readLine().split(" ");
				list = map.get(inputList[0]);
				list.add(Integer.parseInt(inputList[1]));
				map.put(inputList[0], list);
			}

			for (Map.Entry<String, List<Integer>> e : map.entrySet()) {
				list = e.getValue();
				for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			Map<String, List<Integer>> map = new LinkedHashMap<String, List<Integer>>();
			List<Integer> list = new ArrayList<Integer>();
			map.put("S", new ArrayList<Integer>());
			map.put("H", new ArrayList<Integer>());
			map.put("C", new ArrayList<Integer>());
			map.put("D", new ArrayList<Integer>());
			String input = br.readLine();
			int sheet = Integer.parseInt(input);
			int i;
			for (i = 0; i < sheet; i++) {
				String[] inputList = br.readLine().split(" ");
				list = map.get(inputList[0]);
				list.add(Integer.parseInt(inputList[1]));
				map.put(inputList[0], list);
			}

			for (Map.Entry<String, List<Integer>> e : map.entrySet()) {
				list = e.getValue();
				for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				}
			}
		} Map<String, List<Integer>> map = new LinkedHashMap<String, List<Integer>>(); map new LinkedHashMap<String, List<Integer>>() List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() map.put("S", new ArrayList<Integer>()) map.put map "S" new ArrayList<Integer>() map.put("H", new ArrayList<Integer>()) map.put map "H" new ArrayList<Integer>() map.put("C", new ArrayList<Integer>()) map.put map "C" new ArrayList<Integer>() map.put("D", new ArrayList<Integer>()) map.put map "D" new ArrayList<Integer>() String input = br.readLine(); input br.readLine() br.readLine br int sheet = Integer.parseInt(input); sheet Integer.parseInt(input) Integer.parseInt Integer input int i; i for (i = 0; i < sheet; i++) {
				String[] inputList = br.readLine().split(" ");
				list = map.get(inputList[0]);
				list.add(Integer.parseInt(inputList[1]));
				map.put(inputList[0], list);
			} i = 0; i = 0 i 0 i < sheet i sheet i++ i++ i {
				String[] inputList = br.readLine().split(" ");
				list = map.get(inputList[0]);
				list.add(Integer.parseInt(inputList[1]));
				map.put(inputList[0], list);
			} {
				String[] inputList = br.readLine().split(" ");
				list = map.get(inputList[0]);
				list.add(Integer.parseInt(inputList[1]));
				map.put(inputList[0], list);
			} String[] inputList = br.readLine().split(" "); inputList br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " list = map.get(inputList[0]) list map.get(inputList[0]) map.get map inputList[0] inputList 0 list.add(Integer.parseInt(inputList[1])) list.add list Integer.parseInt(inputList[1]) Integer.parseInt Integer inputList[1] inputList 1 map.put(inputList[0], list) map.put map inputList[0] inputList 0 list for (Map.Entry<String, List<Integer>> e : map.entrySet()) {
				list = e.getValue();
				for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				}
			} Map.Entry<String, List<Integer>> e map.entrySet() map.entrySet map {
				list = e.getValue();
				for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				}
			} {
				list = e.getValue();
				for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				}
			} list = e.getValue() list e.getValue() e.getValue e for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				} i = 1; i = 1 i 1 i <= 13 i 13 i++ i++ i {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				} {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				} if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					} !list.contains(i) list.contains(i) list.contains list i {
						System.out.println(e.getKey() + " " + i);
					} System.out.println(e.getKey() + " " + i) System.out.println System.out System System.out e.getKey() + " " + i e.getKey() + " " + i e.getKey() e.getKey e " " i String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

class Main {

	public static void main(String[] args) {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		try {
			Map<String, List<Integer>> map = new LinkedHashMap<String, List<Integer>>();
			List<Integer> list = new ArrayList<Integer>();
			map.put("S", new ArrayList<Integer>());
			map.put("H", new ArrayList<Integer>());
			map.put("C", new ArrayList<Integer>());
			map.put("D", new ArrayList<Integer>());
			String input = br.readLine();
			int sheet = Integer.parseInt(input);
			int i;
			for (i = 0; i < sheet; i++) {
				String[] inputList = br.readLine().split(" ");
				list = map.get(inputList[0]);
				list.add(Integer.parseInt(inputList[1]));
				map.put(inputList[0], list);
			}

			for (Map.Entry<String, List<Integer>> e : map.entrySet()) {
				list = e.getValue();
				for (i = 1; i <= 13; i++) {
					if (!list.contains(i)) {
						System.out.println(e.getKey() + " " + i);
					}
				}
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}