import java.util.Scanner;
class Main {
	int n,i,y;
	String x;
	private int[] S = new int[14];
	private int[] H = new int[14];
	private int[] C = new int[14];
	private int[] D = new int[14];
	public void suzuki(){
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for(i = 0;i != n;i++){
			x = sc.next();
			if(x.equals("S")){
				y = sc.nextInt();
				S[y] = y;
			}else if(x.equals("H")){
				y = sc.nextInt();
				H[y] = y;
			}else if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			}
		}
		for(i = 1;i <= 13;i++){
			if(S[i]  == 0){
				System.out.println("S" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(H[i] == 0){
				System.out.println("H" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(C[i] == 0){
				System.out.println("C" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(D[i] == 0){
				System.out.println("D" + " " + (i));
			}
		}
	}
	public static void main(String[] args){
		new Main().suzuki();
	}
} import java.util.Scanner; Scanner java.util class Main {
	int n,i,y;
	String x;
	private int[] S = new int[14];
	private int[] H = new int[14];
	private int[] C = new int[14];
	private int[] D = new int[14];
	public void suzuki(){
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for(i = 0;i != n;i++){
			x = sc.next();
			if(x.equals("S")){
				y = sc.nextInt();
				S[y] = y;
			}else if(x.equals("H")){
				y = sc.nextInt();
				H[y] = y;
			}else if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			}
		}
		for(i = 1;i <= 13;i++){
			if(S[i]  == 0){
				System.out.println("S" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(H[i] == 0){
				System.out.println("H" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(C[i] == 0){
				System.out.println("C" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(D[i] == 0){
				System.out.println("D" + " " + (i));
			}
		}
	}
	public static void main(String[] args){
		new Main().suzuki();
	}
} Main int n n i i y; y String x; x private int[] S = new int[14]; S new int[14] 14 private int[] H = new int[14]; H new int[14] 14 private int[] C = new int[14]; C new int[14] 14 private int[] D = new int[14]; D new int[14] 14 public void suzuki(){
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for(i = 0;i != n;i++){
			x = sc.next();
			if(x.equals("S")){
				y = sc.nextInt();
				S[y] = y;
			}else if(x.equals("H")){
				y = sc.nextInt();
				H[y] = y;
			}else if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			}
		}
		for(i = 1;i <= 13;i++){
			if(S[i]  == 0){
				System.out.println("S" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(H[i] == 0){
				System.out.println("H" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(C[i] == 0){
				System.out.println("C" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(D[i] == 0){
				System.out.println("D" + " " + (i));
			}
		}
	} suzuki {
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for(i = 0;i != n;i++){
			x = sc.next();
			if(x.equals("S")){
				y = sc.nextInt();
				S[y] = y;
			}else if(x.equals("H")){
				y = sc.nextInt();
				H[y] = y;
			}else if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			}
		}
		for(i = 1;i <= 13;i++){
			if(S[i]  == 0){
				System.out.println("S" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(H[i] == 0){
				System.out.println("H" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(C[i] == 0){
				System.out.println("C" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(D[i] == 0){
				System.out.println("D" + " " + (i));
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = sc.nextInt() n sc.nextInt() sc.nextInt sc for(i = 0;i != n;i++){
			x = sc.next();
			if(x.equals("S")){
				y = sc.nextInt();
				S[y] = y;
			}else if(x.equals("H")){
				y = sc.nextInt();
				H[y] = y;
			}else if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			}
		} i = 0; i = 0 i 0 i != n i n i++ i++ i {
			x = sc.next();
			if(x.equals("S")){
				y = sc.nextInt();
				S[y] = y;
			}else if(x.equals("H")){
				y = sc.nextInt();
				H[y] = y;
			}else if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			}
		} {
			x = sc.next();
			if(x.equals("S")){
				y = sc.nextInt();
				S[y] = y;
			}else if(x.equals("H")){
				y = sc.nextInt();
				H[y] = y;
			}else if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			}
		} x = sc.next() x sc.next() sc.next sc if(x.equals("S")){
				y = sc.nextInt();
				S[y] = y;
			}else if(x.equals("H")){
				y = sc.nextInt();
				H[y] = y;
			}else if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			} x.equals("S") x.equals x "S" {
				y = sc.nextInt();
				S[y] = y;
			} y = sc.nextInt() y sc.nextInt() sc.nextInt sc S[y] = y S[y] S y y if(x.equals("H")){
				y = sc.nextInt();
				H[y] = y;
			}else if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			} x.equals("H") x.equals x "H" {
				y = sc.nextInt();
				H[y] = y;
			} y = sc.nextInt() y sc.nextInt() sc.nextInt sc H[y] = y H[y] H y y if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			} x.equals("C") x.equals x "C" {
				y = sc.nextInt();
				C[y] = y;
			} y = sc.nextInt() y sc.nextInt() sc.nextInt sc C[y] = y C[y] C y y if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			} x.equals("D") x.equals x "D" {
				y = sc.nextInt();
				D[y] = y;
			} y = sc.nextInt() y sc.nextInt() sc.nextInt sc D[y] = y D[y] D y y for(i = 1;i <= 13;i++){
			if(S[i]  == 0){
				System.out.println("S" + " " + (i));
			}
		} i = 1; i = 1 i 1 i <= 13 i 13 i++ i++ i {
			if(S[i]  == 0){
				System.out.println("S" + " " + (i));
			}
		} {
			if(S[i]  == 0){
				System.out.println("S" + " " + (i));
			}
		} if(S[i]  == 0){
				System.out.println("S" + " " + (i));
			} S[i]  == 0 S[i] S i 0 {
				System.out.println("S" + " " + (i));
			} System.out.println("S" + " " + (i)) System.out.println System.out System System.out "S" + " " + (i) "S" + " " + (i) "S" " " (i) for(i = 1;i <= 13;i++){
			if(H[i] == 0){
				System.out.println("H" + " " + (i));
			}
		} i = 1; i = 1 i 1 i <= 13 i 13 i++ i++ i {
			if(H[i] == 0){
				System.out.println("H" + " " + (i));
			}
		} {
			if(H[i] == 0){
				System.out.println("H" + " " + (i));
			}
		} if(H[i] == 0){
				System.out.println("H" + " " + (i));
			} H[i] == 0 H[i] H i 0 {
				System.out.println("H" + " " + (i));
			} System.out.println("H" + " " + (i)) System.out.println System.out System System.out "H" + " " + (i) "H" + " " + (i) "H" " " (i) for(i = 1;i <= 13;i++){
			if(C[i] == 0){
				System.out.println("C" + " " + (i));
			}
		} i = 1; i = 1 i 1 i <= 13 i 13 i++ i++ i {
			if(C[i] == 0){
				System.out.println("C" + " " + (i));
			}
		} {
			if(C[i] == 0){
				System.out.println("C" + " " + (i));
			}
		} if(C[i] == 0){
				System.out.println("C" + " " + (i));
			} C[i] == 0 C[i] C i 0 {
				System.out.println("C" + " " + (i));
			} System.out.println("C" + " " + (i)) System.out.println System.out System System.out "C" + " " + (i) "C" + " " + (i) "C" " " (i) for(i = 1;i <= 13;i++){
			if(D[i] == 0){
				System.out.println("D" + " " + (i));
			}
		} i = 1; i = 1 i 1 i <= 13 i 13 i++ i++ i {
			if(D[i] == 0){
				System.out.println("D" + " " + (i));
			}
		} {
			if(D[i] == 0){
				System.out.println("D" + " " + (i));
			}
		} if(D[i] == 0){
				System.out.println("D" + " " + (i));
			} D[i] == 0 D[i] D i 0 {
				System.out.println("D" + " " + (i));
			} System.out.println("D" + " " + (i)) System.out.println System.out System System.out "D" + " " + (i) "D" + " " + (i) "D" " " (i) public static void main(String[] args){
		new Main().suzuki();
	} main {
		new Main().suzuki();
	} new Main().suzuki() new Main().suzuki new Main() String[] args args
import java.util.Scanner;
class Main {
	int n,i,y;
	String x;
	private int[] S = new int[14];
	private int[] H = new int[14];
	private int[] C = new int[14];
	private int[] D = new int[14];
	public void suzuki(){
		Scanner sc = new Scanner(System.in);
		n = sc.nextInt();
		for(i = 0;i != n;i++){
			x = sc.next();
			if(x.equals("S")){
				y = sc.nextInt();
				S[y] = y;
			}else if(x.equals("H")){
				y = sc.nextInt();
				H[y] = y;
			}else if(x.equals("C")){
				y = sc.nextInt();
				C[y] = y;
			}else if(x.equals("D")){
				y = sc.nextInt();
				D[y] = y;
			}
		}
		for(i = 1;i <= 13;i++){
			if(S[i]  == 0){
				System.out.println("S" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(H[i] == 0){
				System.out.println("H" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(C[i] == 0){
				System.out.println("C" + " " + (i));
			}
		}
		for(i = 1;i <= 13;i++){
			if(D[i] == 0){
				System.out.println("D" + " " + (i));
			}
		}
	}
	public static void main(String[] args){
		new Main().suzuki();
	}
}