import java.util.*;
public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String[] suit = {"S","H","C","D"};
		String[] rank = {"1","2","3","4","5","6","7","8","9","10","11","12","13"};
		int n = sc.nextInt();
		String[][] card = new String[4][13];
		for (int i = 0; i < n; i ++ ){
			String s = sc.next();
			String r = sc.next();
			int sIdx = Arrays.asList(suit).indexOf(s);
			int rIdx = Arrays.asList(rank).indexOf(r);
//			System.out.println(sIdx + " " + rIdx);
			card[sIdx][rIdx] = "ok";
		}
		for (int i = 0; i < 4; i ++ ){
			for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			}
		}
		sc.close();
	}
} import java.util.*; util.* java public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String[] suit = {"S","H","C","D"};
		String[] rank = {"1","2","3","4","5","6","7","8","9","10","11","12","13"};
		int n = sc.nextInt();
		String[][] card = new String[4][13];
		for (int i = 0; i < n; i ++ ){
			String s = sc.next();
			String r = sc.next();
			int sIdx = Arrays.asList(suit).indexOf(s);
			int rIdx = Arrays.asList(rank).indexOf(r);
//			System.out.println(sIdx + " " + rIdx);
			card[sIdx][rIdx] = "ok";
		}
		for (int i = 0; i < 4; i ++ ){
			for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			}
		}
		sc.close();
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String[] suit = {"S","H","C","D"};
		String[] rank = {"1","2","3","4","5","6","7","8","9","10","11","12","13"};
		int n = sc.nextInt();
		String[][] card = new String[4][13];
		for (int i = 0; i < n; i ++ ){
			String s = sc.next();
			String r = sc.next();
			int sIdx = Arrays.asList(suit).indexOf(s);
			int rIdx = Arrays.asList(rank).indexOf(r);
//			System.out.println(sIdx + " " + rIdx);
			card[sIdx][rIdx] = "ok";
		}
		for (int i = 0; i < 4; i ++ ){
			for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			}
		}
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		String[] suit = {"S","H","C","D"};
		String[] rank = {"1","2","3","4","5","6","7","8","9","10","11","12","13"};
		int n = sc.nextInt();
		String[][] card = new String[4][13];
		for (int i = 0; i < n; i ++ ){
			String s = sc.next();
			String r = sc.next();
			int sIdx = Arrays.asList(suit).indexOf(s);
			int rIdx = Arrays.asList(rank).indexOf(r);
//			System.out.println(sIdx + " " + rIdx);
			card[sIdx][rIdx] = "ok";
		}
		for (int i = 0; i < 4; i ++ ){
			for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			}
		}
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] suit = {"S","H","C","D"}; suit {"S","H","C","D"} "S" "H" "C" "D" String[] rank = {"1","2","3","4","5","6","7","8","9","10","11","12","13"}; rank {"1","2","3","4","5","6","7","8","9","10","11","12","13"} "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String[][] card = new String[4][13]; card new String[4][13] 4 13 for (int i = 0; i < n; i ++ ){
			String s = sc.next();
			String r = sc.next();
			int sIdx = Arrays.asList(suit).indexOf(s);
			int rIdx = Arrays.asList(rank).indexOf(r);
//			System.out.println(sIdx + " " + rIdx);
			card[sIdx][rIdx] = "ok";
		} int i = 0; int i = 0; i 0 i < n i n i ++ i ++ i {
			String s = sc.next();
			String r = sc.next();
			int sIdx = Arrays.asList(suit).indexOf(s);
			int rIdx = Arrays.asList(rank).indexOf(r);
//			System.out.println(sIdx + " " + rIdx);
			card[sIdx][rIdx] = "ok";
		} {
			String s = sc.next();
			String r = sc.next();
			int sIdx = Arrays.asList(suit).indexOf(s);
			int rIdx = Arrays.asList(rank).indexOf(r);
//			System.out.println(sIdx + " " + rIdx);
			card[sIdx][rIdx] = "ok";
		} String s = sc.next(); s sc.next() sc.next sc String r = sc.next(); r sc.next() sc.next sc int sIdx = Arrays.asList(suit).indexOf(s); sIdx Arrays.asList(suit).indexOf(s) Arrays.asList(suit).indexOf Arrays.asList(suit) Arrays.asList Arrays suit s int rIdx = Arrays.asList(rank).indexOf(r); rIdx Arrays.asList(rank).indexOf(r) Arrays.asList(rank).indexOf Arrays.asList(rank) Arrays.asList Arrays rank r card[sIdx][rIdx] = "ok" card[sIdx][rIdx] card[sIdx] card sIdx rIdx "ok" for (int i = 0; i < 4; i ++ ){
			for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i ++ i ++ i {
			for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			}
		} {
			for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			}
		} for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			} int k = 0; int k = 0; k 0 k < 13 k 13 k ++ k ++ k {
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			} {
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			} if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				} card[i][k] == null card[i][k] card[i] card i k null {
					System.out.println(suit[i] + " " + rank[k]);
				} System.out.println(suit[i] + " " + rank[k]) System.out.println System.out System System.out suit[i] + " " + rank[k] suit[i] + " " + rank[k] suit[i] suit i " " rank[k] rank k sc.close() sc.close sc String args[] args public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String[] suit = {"S","H","C","D"};
		String[] rank = {"1","2","3","4","5","6","7","8","9","10","11","12","13"};
		int n = sc.nextInt();
		String[][] card = new String[4][13];
		for (int i = 0; i < n; i ++ ){
			String s = sc.next();
			String r = sc.next();
			int sIdx = Arrays.asList(suit).indexOf(s);
			int rIdx = Arrays.asList(rank).indexOf(r);
//			System.out.println(sIdx + " " + rIdx);
			card[sIdx][rIdx] = "ok";
		}
		for (int i = 0; i < 4; i ++ ){
			for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			}
		}
		sc.close();
	}
} public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String[] suit = {"S","H","C","D"};
		String[] rank = {"1","2","3","4","5","6","7","8","9","10","11","12","13"};
		int n = sc.nextInt();
		String[][] card = new String[4][13];
		for (int i = 0; i < n; i ++ ){
			String s = sc.next();
			String r = sc.next();
			int sIdx = Arrays.asList(suit).indexOf(s);
			int rIdx = Arrays.asList(rank).indexOf(r);
//			System.out.println(sIdx + " " + rIdx);
			card[sIdx][rIdx] = "ok";
		}
		for (int i = 0; i < 4; i ++ ){
			for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			}
		}
		sc.close();
	}
} Main
import java.util.*;
public class Main {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String[] suit = {"S","H","C","D"};
		String[] rank = {"1","2","3","4","5","6","7","8","9","10","11","12","13"};
		int n = sc.nextInt();
		String[][] card = new String[4][13];
		for (int i = 0; i < n; i ++ ){
			String s = sc.next();
			String r = sc.next();
			int sIdx = Arrays.asList(suit).indexOf(s);
			int rIdx = Arrays.asList(rank).indexOf(r);
//			System.out.println(sIdx + " " + rIdx);
			card[sIdx][rIdx] = "ok";
		}
		for (int i = 0; i < 4; i ++ ){
			for (int k = 0; k < 13; k ++ ){
				if (card[i][k] == null){
					System.out.println(suit[i] + " " + rank[k]);
				}
			}
		}
		sc.close();
	}
}