
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		// S = 0, H = 1, C = 2, D = 3 ??§?????????
		// ?????????????????????????????????????????????*13 + ??????????????°???-1

		int n = 0;
		boolean number[] = new boolean[52]; // ????????????????????????????????±??????
		int mark = 0;
		int cardNum = 0;

		// n??????????????????????????????????????¨????????????
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();

		boolean a = false;
		for (int i = 0; i < n; i++) {

			// ????????????????????\?????????
			String moji = stdIn.next();

			if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			}

			cardNum = stdIn.nextInt();
			number[mark * 13 + cardNum - 1] = true;
		}

		for (int i = 0; i < number.length; i++) {
			String mark1 = "";	//?????????
			if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			}
		}
		stdIn.close();
		if (a) {
			return;
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		// S = 0, H = 1, C = 2, D = 3 ??§?????????
		// ?????????????????????????????????????????????*13 + ??????????????°???-1

		int n = 0;
		boolean number[] = new boolean[52]; // ????????????????????????????????±??????
		int mark = 0;
		int cardNum = 0;

		// n??????????????????????????????????????¨????????????
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();

		boolean a = false;
		for (int i = 0; i < n; i++) {

			// ????????????????????\?????????
			String moji = stdIn.next();

			if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			}

			cardNum = stdIn.nextInt();
			number[mark * 13 + cardNum - 1] = true;
		}

		for (int i = 0; i < number.length; i++) {
			String mark1 = "";	//?????????
			if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			}
		}
		stdIn.close();
		if (a) {
			return;
		}

	}

} Main public static void main(String[] args) {

		// S = 0, H = 1, C = 2, D = 3 ??§?????????
		// ?????????????????????????????????????????????*13 + ??????????????°???-1

		int n = 0;
		boolean number[] = new boolean[52]; // ????????????????????????????????±??????
		int mark = 0;
		int cardNum = 0;

		// n??????????????????????????????????????¨????????????
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();

		boolean a = false;
		for (int i = 0; i < n; i++) {

			// ????????????????????\?????????
			String moji = stdIn.next();

			if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			}

			cardNum = stdIn.nextInt();
			number[mark * 13 + cardNum - 1] = true;
		}

		for (int i = 0; i < number.length; i++) {
			String mark1 = "";	//?????????
			if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			}
		}
		stdIn.close();
		if (a) {
			return;
		}

	} main {

		// S = 0, H = 1, C = 2, D = 3 ??§?????????
		// ?????????????????????????????????????????????*13 + ??????????????°???-1

		int n = 0;
		boolean number[] = new boolean[52]; // ????????????????????????????????±??????
		int mark = 0;
		int cardNum = 0;

		// n??????????????????????????????????????¨????????????
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();

		boolean a = false;
		for (int i = 0; i < n; i++) {

			// ????????????????????\?????????
			String moji = stdIn.next();

			if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			}

			cardNum = stdIn.nextInt();
			number[mark * 13 + cardNum - 1] = true;
		}

		for (int i = 0; i < number.length; i++) {
			String mark1 = "";	//?????????
			if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			}
		}
		stdIn.close();
		if (a) {
			return;
		}

	} int n = 0; n 0 boolean number[] = new boolean[52]; number new boolean[52] 52 int mark = 0; mark 0 int cardNum = 0; cardNum 0 Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) n = stdIn.nextInt() n stdIn.nextInt() stdIn.nextInt stdIn boolean a = false; a false for (int i = 0; i < n; i++) {

			// ????????????????????\?????????
			String moji = stdIn.next();

			if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			}

			cardNum = stdIn.nextInt();
			number[mark * 13 + cardNum - 1] = true;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {

			// ????????????????????\?????????
			String moji = stdIn.next();

			if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			}

			cardNum = stdIn.nextInt();
			number[mark * 13 + cardNum - 1] = true;
		} {

			// ????????????????????\?????????
			String moji = stdIn.next();

			if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			}

			cardNum = stdIn.nextInt();
			number[mark * 13 + cardNum - 1] = true;
		} String moji = stdIn.next(); moji stdIn.next() stdIn.next stdIn if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			} moji.equals("S") moji.equals moji "S" {
				mark = 0;
			} mark = 0 mark 0 if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			} moji.equals("H") moji.equals moji "H" {
				mark = 1;
			} mark = 1 mark 1 if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			} moji.equals("C") moji.equals moji "C" {
				mark = 2;
			} mark = 2 mark 2 if (moji.equals("D")) {
				mark = 3;
			} moji.equals("D") moji.equals moji "D" {
				mark = 3;
			} mark = 3 mark 3 cardNum = stdIn.nextInt() cardNum stdIn.nextInt() stdIn.nextInt stdIn number[mark * 13 + cardNum - 1] = true number[mark * 13 + cardNum - 1] number mark * 13 + cardNum - 1 mark * 13 + cardNum mark * 13 mark 13 cardNum 1 true for (int i = 0; i < number.length; i++) {
			String mark1 = "";	//?????????
			if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			}
		} int i = 0; int i = 0; i 0 i < number.length i number.length number number.length i++ i++ i {
			String mark1 = "";	//?????????
			if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			}
		} {
			String mark1 = "";	//?????????
			if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			}
		} String mark1 = ""; mark1 "" if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			} number[i] == false number[i] number i false {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			} mark = i / 13 mark i / 13 i 13 if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				} mark == 0 mark 0 {
					mark1 = "S";
				} mark1 = "S" mark1 "S" if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				} mark == 1 mark 1 {
					mark1 = "H";
				} mark1 = "H" mark1 "H" if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				} mark == 2 mark 2 {
					mark1 = "C";
				} mark1 = "C" mark1 "C" if (mark == 3) {
					mark1 = "D";
				} mark == 3 mark 3 {
					mark1 = "D";
				} mark1 = "D" mark1 "D" cardNum = i % 13 + 1 cardNum i % 13 + 1 i % 13 i 13 1 System.out.println(mark1 + " " + cardNum) System.out.println System.out System System.out mark1 + " " + cardNum mark1 + " " + cardNum mark1 " " cardNum stdIn.close() stdIn.close stdIn if (a) {
			return;
		} a {
			return;
		} return; String[] args args public class Main {
	public static void main(String[] args) {

		// S = 0, H = 1, C = 2, D = 3 ??§?????????
		// ?????????????????????????????????????????????*13 + ??????????????°???-1

		int n = 0;
		boolean number[] = new boolean[52]; // ????????????????????????????????±??????
		int mark = 0;
		int cardNum = 0;

		// n??????????????????????????????????????¨????????????
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();

		boolean a = false;
		for (int i = 0; i < n; i++) {

			// ????????????????????\?????????
			String moji = stdIn.next();

			if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			}

			cardNum = stdIn.nextInt();
			number[mark * 13 + cardNum - 1] = true;
		}

		for (int i = 0; i < number.length; i++) {
			String mark1 = "";	//?????????
			if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			}
		}
		stdIn.close();
		if (a) {
			return;
		}

	}

} public class Main {
	public static void main(String[] args) {

		// S = 0, H = 1, C = 2, D = 3 ??§?????????
		// ?????????????????????????????????????????????*13 + ??????????????°???-1

		int n = 0;
		boolean number[] = new boolean[52]; // ????????????????????????????????±??????
		int mark = 0;
		int cardNum = 0;

		// n??????????????????????????????????????¨????????????
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();

		boolean a = false;
		for (int i = 0; i < n; i++) {

			// ????????????????????\?????????
			String moji = stdIn.next();

			if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			}

			cardNum = stdIn.nextInt();
			number[mark * 13 + cardNum - 1] = true;
		}

		for (int i = 0; i < number.length; i++) {
			String mark1 = "";	//?????????
			if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			}
		}
		stdIn.close();
		if (a) {
			return;
		}

	}

} Main

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {

		// S = 0, H = 1, C = 2, D = 3 ??§?????????
		// ?????????????????????????????????????????????*13 + ??????????????°???-1

		int n = 0;
		boolean number[] = new boolean[52]; // ????????????????????????????????±??????
		int mark = 0;
		int cardNum = 0;

		// n??????????????????????????????????????¨????????????
		Scanner stdIn = new Scanner(System.in);
		n = stdIn.nextInt();

		boolean a = false;
		for (int i = 0; i < n; i++) {

			// ????????????????????\?????????
			String moji = stdIn.next();

			if (moji.equals("S")) {
				mark = 0;
			}
			else if (moji.equals("H")) {
				mark = 1;
			}
			else if (moji.equals("C")) {
				mark = 2;
			}
			else if (moji.equals("D")) {
				mark = 3;
			}

			cardNum = stdIn.nextInt();
			number[mark * 13 + cardNum - 1] = true;
		}

		for (int i = 0; i < number.length; i++) {
			String mark1 = "";	//?????????
			if (number[i] == false) {
				mark = i / 13;

				if (mark == 0) {
					mark1 = "S";
				}
				else if (mark == 1) {
					mark1 = "H";
				}
				else if (mark == 2) {
					mark1 = "C";
				}
				else if (mark == 3) {
					mark1 = "D";
				}

				cardNum = i % 13 + 1;
				System.out.println(mark1 + " " + cardNum);
			}
		}
		stdIn.close();
		if (a) {
			return;
		}

	}

}