

import java.util.*;

public class Main {
	public static void main(String args[]) {
		Scanner scan = new Scanner(System.in);
		int n, count, i;
		i = 0;
		count = 0;// for?????§?????¨
		n = scan.nextInt();
		StringBuilder sb = new StringBuilder();
		List<String> list = new ArrayList<String>();
		List<Integer> list2 = new ArrayList<Integer>();
		List<Integer> list3 = new ArrayList<Integer>();
		// ??????????????????????????±?????\???
		for (; count < n; count++) {
			list.add(scan.next());// ??????
			list2.add(scan.nextInt());// ??°???
		}

		// list3????????????
		for (; i < 13; i++) {
			list3.add(i+1);
		}

		// S???????????????)?????????
		count = 0;
		i = 0;
		for (; count < n; count++) {// n??????????????????
			if (list.get(count).equals("S")) {// S??§?????????????????????????????????
				list3.set(list2.get(count) - 1, 0);// ?????????????????°??????list3??§0???????????????
			}
		}
		// S(????????????)?????????StringBuilder?????\???
		for (; i < 13; i++) {
			if (list3.get(i) != 0) {
				sb.append("S");
				sb.append(" ");
				sb.append(list3.get(i));
				sb.append("\n");
			}
		}

		// list3????????????
		list3.clear();
		i = 0;
		for (; i < 13; i++) {
			list3.add(i+1);
		} // S(???????????????????????????????????§

		// H????????????)?????????
		count = 0;
		i = 0;
		for (; count < n; count++) {// n??????????????????
			if (list.get(count).equals("H")) {// H??§?????????????????????????????????
				list3.set(list2.get(count) - 1, 0);// ?????????????????°??????list3??§0???????????????
			}
		}
		// H(?????????)?????????StringBuilder?????\???
		for (; i < 13; i++) {
			if (list3.get(i) != 0) {
				sb.append("H");
				sb.append(" ");
				sb.append(list3.get(i));
				sb.append("\n");
			}
		}

		// list3????????????
		list3.clear();
		i = 0;
		for (; i < 13; i++) {
			list3.add(i+1);
		} // H(????????????????????????????????§
		
		// C????????????)?????????
		count = 0;
		i = 0;
		for (; count < n; count++) {// n??????????????????
			if (list.get(count).equals("C")) {// C??§?????????????????????????????????
				list3.set(list2.get(count) - 1, 0);// ?????????????????°??????list3??§0???????????????
			}
		}
		// H(?????????)?????????StringBuilder?????\???
		for (; i < 13; i++) {
			if (list3.get(i) != 0) {
				sb.append("C");
				sb.append(" ");
				sb.append(list3.get(i));
				sb.append("\n");
			}
		}

		// list3????????????
		list3.clear();
		i = 0;
		for (; i < 13; i++) {
			list3.add(i+1);
		}//C(????????????????????????????????§
		
		// D????????????)?????????
				count = 0;
				i = 0;
				for (; count < n; count++) {// n??????????????????
					if (list.get(count).equals("D")) {//D??§?????????????????????????????????
						list3.set(list2.get(count) - 1, 0);// ?????????????????°??????list3??§0???????????????
					}
				}
				// D(?????????)?????????StringBuilder?????\???
				for (; i < 13; i++) {
					if (list3.get(i) != 0) {
						sb.append("D");
						sb.append(" ");
						sb.append(list3.get(i));
						sb.append("\n");
					}
				}

				// list3????????????
				list3.clear();
				i = 0;
				for (; i < 13; i++) {
					list3.add(i+1);
				}//D(????????????????????????????????§

		System.out.print(new String(sb));

	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz