import java.util.Scanner;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		ArrayList<String> deck = new ArrayList<String>();
		String suit;
		int p = 0;
		for (int i = 0; i < 4; i++) {
			for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			}
		}
		for (int i = 0; i <= num; i++) {
			String test = scan.nextLine();
			for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			}
		}
		for (int q = 0; q < deck.size(); q++) {
			System.out.println(deck.get(q));
		}
	}
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		ArrayList<String> deck = new ArrayList<String>();
		String suit;
		int p = 0;
		for (int i = 0; i < 4; i++) {
			for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			}
		}
		for (int i = 0; i <= num; i++) {
			String test = scan.nextLine();
			for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			}
		}
		for (int q = 0; q < deck.size(); q++) {
			System.out.println(deck.get(q));
		}
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		ArrayList<String> deck = new ArrayList<String>();
		String suit;
		int p = 0;
		for (int i = 0; i < 4; i++) {
			for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			}
		}
		for (int i = 0; i <= num; i++) {
			String test = scan.nextLine();
			for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			}
		}
		for (int q = 0; q < deck.size(); q++) {
			System.out.println(deck.get(q));
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		ArrayList<String> deck = new ArrayList<String>();
		String suit;
		int p = 0;
		for (int i = 0; i < 4; i++) {
			for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			}
		}
		for (int i = 0; i <= num; i++) {
			String test = scan.nextLine();
			for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			}
		}
		for (int q = 0; q < deck.size(); q++) {
			System.out.println(deck.get(q));
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int num = scan.nextInt(); num scan.nextInt() scan.nextInt scan ArrayList<String> deck = new ArrayList<String>(); deck new ArrayList<String>() String suit; suit int p = 0; p 0 for (int i = 0; i < 4; i++) {
			for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			}
		} {
			for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			}
		} for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			} int j = 1; int j = 1; j 1 j < 14 j 14 j++ j++ j {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			} {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			} if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				} i == 0 i 0 {
					suit = "S";
				} suit = "S" suit "S" if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				} i == 1 i 1 {
					suit = "H";
				} suit = "H" suit "H" if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				} i == 2 i 2 {
					suit = "C";
				} suit = "C" suit "C" {
					suit = "D";
				} suit = "D" suit "D" deck.add(suit + " " + Integer.toString(j)) deck.add deck suit + " " + Integer.toString(j) suit + " " + Integer.toString(j) suit " " Integer.toString(j) Integer.toString Integer j for (int i = 0; i <= num; i++) {
			String test = scan.nextLine();
			for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			}
		} int i = 0; int i = 0; i 0 i <= num i num i++ i++ i {
			String test = scan.nextLine();
			for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			}
		} {
			String test = scan.nextLine();
			for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			}
		} String test = scan.nextLine(); test scan.nextLine() scan.nextLine scan for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			} int q = 0; int q = 0; q 0 q < deck.size() q deck.size() deck.size deck q++ q++ q {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			} {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			} if (deck.get(q).equals(test)) {
					deck.remove(q);
				} deck.get(q).equals(test) deck.get(q).equals deck.get(q) deck.get deck q test {
					deck.remove(q);
				} deck.remove(q) deck.remove deck q for (int q = 0; q < deck.size(); q++) {
			System.out.println(deck.get(q));
		} int q = 0; int q = 0; q 0 q < deck.size() q deck.size() deck.size deck q++ q++ q {
			System.out.println(deck.get(q));
		} {
			System.out.println(deck.get(q));
		} System.out.println(deck.get(q)) System.out.println System.out System System.out deck.get(q) deck.get deck q String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		ArrayList<String> deck = new ArrayList<String>();
		String suit;
		int p = 0;
		for (int i = 0; i < 4; i++) {
			for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			}
		}
		for (int i = 0; i <= num; i++) {
			String test = scan.nextLine();
			for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			}
		}
		for (int q = 0; q < deck.size(); q++) {
			System.out.println(deck.get(q));
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		ArrayList<String> deck = new ArrayList<String>();
		String suit;
		int p = 0;
		for (int i = 0; i < 4; i++) {
			for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			}
		}
		for (int i = 0; i <= num; i++) {
			String test = scan.nextLine();
			for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			}
		}
		for (int q = 0; q < deck.size(); q++) {
			System.out.println(deck.get(q));
		}
	}
} Main
import java.util.Scanner;
import java.util.ArrayList;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int num = scan.nextInt();
		ArrayList<String> deck = new ArrayList<String>();
		String suit;
		int p = 0;
		for (int i = 0; i < 4; i++) {
			for (int j = 1; j < 14; j++) {
				if (i == 0) {
					suit = "S";
				} else if (i == 1) {
					suit = "H";
				} else if (i == 2) {
					suit = "C";
				} else {
					suit = "D";
				}
				deck.add(suit + " " + Integer.toString(j));
			}
		}
		for (int i = 0; i <= num; i++) {
			String test = scan.nextLine();
			for (int q = 0; q < deck.size(); q++) {
				if (deck.get(q).equals(test)) {
					deck.remove(q);
				}
			}
		}
		for (int q = 0; q < deck.size(); q++) {
			System.out.println(deck.get(q));
		}
	}
}
