import java.util.Scanner;

class Main {

	public static void main(String args[]){	
		Scanner scan = new Scanner(System.in);

		int m, n;
		
		n = scan.nextInt();
		String[] c ={"S", "H", "C", "D"}; 
		
		int a[][];
		a = new int[4][13];
		
		for(int i = 0;i < n;i++){
			String s = scan.next();
			m = scan.nextInt();
			
			for(int j = 0; j < 4; j++) {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			}
		}
			
		for(int i = 0;i < 4;i++){
			for(int j = 0; j < 13;j++){
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			}
		}
	}	
} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String args[]){	
		Scanner scan = new Scanner(System.in);

		int m, n;
		
		n = scan.nextInt();
		String[] c ={"S", "H", "C", "D"}; 
		
		int a[][];
		a = new int[4][13];
		
		for(int i = 0;i < n;i++){
			String s = scan.next();
			m = scan.nextInt();
			
			for(int j = 0; j < 4; j++) {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			}
		}
			
		for(int i = 0;i < 4;i++){
			for(int j = 0; j < 13;j++){
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			}
		}
	}	
} Main public static void main(String args[]){	
		Scanner scan = new Scanner(System.in);

		int m, n;
		
		n = scan.nextInt();
		String[] c ={"S", "H", "C", "D"}; 
		
		int a[][];
		a = new int[4][13];
		
		for(int i = 0;i < n;i++){
			String s = scan.next();
			m = scan.nextInt();
			
			for(int j = 0; j < 4; j++) {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			}
		}
			
		for(int i = 0;i < 4;i++){
			for(int j = 0; j < 13;j++){
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			}
		}
	} main {	
		Scanner scan = new Scanner(System.in);

		int m, n;
		
		n = scan.nextInt();
		String[] c ={"S", "H", "C", "D"}; 
		
		int a[][];
		a = new int[4][13];
		
		for(int i = 0;i < n;i++){
			String s = scan.next();
			m = scan.nextInt();
			
			for(int j = 0; j < 4; j++) {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			}
		}
			
		for(int i = 0;i < 4;i++){
			for(int j = 0; j < 13;j++){
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			}
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int m m n; n n = scan.nextInt() n scan.nextInt() scan.nextInt scan String[] c ={"S", "H", "C", "D"}; c {"S", "H", "C", "D"} "S" "H" "C" "D" int a[][]; a a = new int[4][13] a new int[4][13] 4 13 for(int i = 0;i < n;i++){
			String s = scan.next();
			m = scan.nextInt();
			
			for(int j = 0; j < 4; j++) {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			String s = scan.next();
			m = scan.nextInt();
			
			for(int j = 0; j < 4; j++) {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			}
		} {
			String s = scan.next();
			m = scan.nextInt();
			
			for(int j = 0; j < 4; j++) {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			}
		} String s = scan.next(); s scan.next() scan.next scan m = scan.nextInt() m scan.nextInt() scan.nextInt scan for(int j = 0; j < 4; j++) {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			} int j = 0; int j = 0; j 0 j < 4 j 4 j++ j++ j {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			} {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			} if(c[j].equals(s)) a[j][m - 1] = 1; c[j].equals(s) c[j].equals c[j] c j s a[j][m - 1] = 1 a[j][m - 1] a[j] a j m - 1 m 1 1 for(int i = 0;i < 4;i++){
			for(int j = 0; j < 13;j++){
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			}
		} int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
			for(int j = 0; j < 13;j++){
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			}
		} {
			for(int j = 0; j < 13;j++){
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			}
		} for(int j = 0; j < 13;j++){
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			} int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			} {
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			} if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				} a[i][j] == 0 a[i][j] a[i] a i j 0 {
					System.out.println(c[i] + " " + (j + 1));
				} System.out.println(c[i] + " " + (j + 1)) System.out.println System.out System System.out c[i] + " " + (j + 1) c[i] + " " + (j + 1) c[i] c i " " (j + 1) j 1 String args[] args
import java.util.Scanner;

class Main {

	public static void main(String args[]){	
		Scanner scan = new Scanner(System.in);

		int m, n;
		
		n = scan.nextInt();
		String[] c ={"S", "H", "C", "D"}; 
		
		int a[][];
		a = new int[4][13];
		
		for(int i = 0;i < n;i++){
			String s = scan.next();
			m = scan.nextInt();
			
			for(int j = 0; j < 4; j++) {
				if(c[j].equals(s)) a[j][m - 1] = 1;
			}
		}
			
		for(int i = 0;i < 4;i++){
			for(int j = 0; j < 13;j++){
				if(a[i][j] == 0){
					System.out.println(c[i] + " " + (j + 1));
				}
			}
		}
	}	
}