import java.util.Scanner;

public class Main {
public static void main(String [] args){
		
		Scanner scan = new Scanner(System.in);
		
		int cards[][];
		cards = new int[4][13];
		int i, j, num;
		
		for(i=0; i<4; i++){
			num = 1;
			for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			}
		}
		
		int a = scan.nextInt();
		for(i=0; i<a; i++){
			char op = scan.next().charAt(0);
			int c = scan.nextInt();
			
			if(op == 'S'){
				cards[0][c-1] = 0; 
			}
			if(op == 'H'){
				cards[1][c-1] = 0; 
			}
			if(op == 'C'){
				cards[2][c-1] = 0; 
			}
			if(op == 'D'){
				cards[3][c-1] = 0; 
			}
		}
		
		for(i=0; i<4; i++){
			for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			}
		}
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
public static void main(String [] args){
		
		Scanner scan = new Scanner(System.in);
		
		int cards[][];
		cards = new int[4][13];
		int i, j, num;
		
		for(i=0; i<4; i++){
			num = 1;
			for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			}
		}
		
		int a = scan.nextInt();
		for(i=0; i<a; i++){
			char op = scan.next().charAt(0);
			int c = scan.nextInt();
			
			if(op == 'S'){
				cards[0][c-1] = 0; 
			}
			if(op == 'H'){
				cards[1][c-1] = 0; 
			}
			if(op == 'C'){
				cards[2][c-1] = 0; 
			}
			if(op == 'D'){
				cards[3][c-1] = 0; 
			}
		}
		
		for(i=0; i<4; i++){
			for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			}
		}
		
	}
} Main public static void main(String [] args){
		
		Scanner scan = new Scanner(System.in);
		
		int cards[][];
		cards = new int[4][13];
		int i, j, num;
		
		for(i=0; i<4; i++){
			num = 1;
			for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			}
		}
		
		int a = scan.nextInt();
		for(i=0; i<a; i++){
			char op = scan.next().charAt(0);
			int c = scan.nextInt();
			
			if(op == 'S'){
				cards[0][c-1] = 0; 
			}
			if(op == 'H'){
				cards[1][c-1] = 0; 
			}
			if(op == 'C'){
				cards[2][c-1] = 0; 
			}
			if(op == 'D'){
				cards[3][c-1] = 0; 
			}
		}
		
		for(i=0; i<4; i++){
			for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			}
		}
		
	} main {
		
		Scanner scan = new Scanner(System.in);
		
		int cards[][];
		cards = new int[4][13];
		int i, j, num;
		
		for(i=0; i<4; i++){
			num = 1;
			for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			}
		}
		
		int a = scan.nextInt();
		for(i=0; i<a; i++){
			char op = scan.next().charAt(0);
			int c = scan.nextInt();
			
			if(op == 'S'){
				cards[0][c-1] = 0; 
			}
			if(op == 'H'){
				cards[1][c-1] = 0; 
			}
			if(op == 'C'){
				cards[2][c-1] = 0; 
			}
			if(op == 'D'){
				cards[3][c-1] = 0; 
			}
		}
		
		for(i=0; i<4; i++){
			for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			}
		}
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int cards[][]; cards cards = new int[4][13] cards new int[4][13] 4 13 int i i j j num; num for(i=0; i<4; i++){
			num = 1;
			for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			}
		} i=0; i=0 i 0 i<4 i 4 i++ i++ i {
			num = 1;
			for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			}
		} {
			num = 1;
			for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			}
		} num = 1 num 1 for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			} j=0; j=0 j 0 j<13 j 13 j++ j++ j {
				cards[i][j] = num;
				num++;
			} {
				cards[i][j] = num;
				num++;
			} cards[i][j] = num cards[i][j] cards[i] cards i j num num++ num int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan for(i=0; i<a; i++){
			char op = scan.next().charAt(0);
			int c = scan.nextInt();
			
			if(op == 'S'){
				cards[0][c-1] = 0; 
			}
			if(op == 'H'){
				cards[1][c-1] = 0; 
			}
			if(op == 'C'){
				cards[2][c-1] = 0; 
			}
			if(op == 'D'){
				cards[3][c-1] = 0; 
			}
		} i=0; i=0 i 0 i<a i a i++ i++ i {
			char op = scan.next().charAt(0);
			int c = scan.nextInt();
			
			if(op == 'S'){
				cards[0][c-1] = 0; 
			}
			if(op == 'H'){
				cards[1][c-1] = 0; 
			}
			if(op == 'C'){
				cards[2][c-1] = 0; 
			}
			if(op == 'D'){
				cards[3][c-1] = 0; 
			}
		} {
			char op = scan.next().charAt(0);
			int c = scan.nextInt();
			
			if(op == 'S'){
				cards[0][c-1] = 0; 
			}
			if(op == 'H'){
				cards[1][c-1] = 0; 
			}
			if(op == 'C'){
				cards[2][c-1] = 0; 
			}
			if(op == 'D'){
				cards[3][c-1] = 0; 
			}
		} char op = scan.next().charAt(0); op scan.next().charAt(0) scan.next().charAt scan.next() scan.next scan 0 int c = scan.nextInt(); c scan.nextInt() scan.nextInt scan if(op == 'S'){
				cards[0][c-1] = 0; 
			} op == 'S' op 'S' {
				cards[0][c-1] = 0; 
			} cards[0][c-1] = 0 cards[0][c-1] cards[0] cards 0 c-1 c 1 0 if(op == 'H'){
				cards[1][c-1] = 0; 
			} op == 'H' op 'H' {
				cards[1][c-1] = 0; 
			} cards[1][c-1] = 0 cards[1][c-1] cards[1] cards 1 c-1 c 1 0 if(op == 'C'){
				cards[2][c-1] = 0; 
			} op == 'C' op 'C' {
				cards[2][c-1] = 0; 
			} cards[2][c-1] = 0 cards[2][c-1] cards[2] cards 2 c-1 c 1 0 if(op == 'D'){
				cards[3][c-1] = 0; 
			} op == 'D' op 'D' {
				cards[3][c-1] = 0; 
			} cards[3][c-1] = 0 cards[3][c-1] cards[3] cards 3 c-1 c 1 0 for(i=0; i<4; i++){
			for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			}
		} i=0; i=0 i 0 i<4 i 4 i++ i++ i {
			for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			}
		} {
			for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			}
		} for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			} j=0; j=0 j 0 j<13 j 13 j++ j++ j {
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			} {
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			} if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				} cards[i][j] != 0 cards[i][j] cards[i] cards i j 0 {
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				} if(i==0){
						System.out.println("S "+cards[i][j]);
					} i==0 i 0 {
						System.out.println("S "+cards[i][j]);
					} System.out.println("S "+cards[i][j]) System.out.println System.out System System.out "S "+cards[i][j] "S " cards[i][j] cards[i] cards i j if(i==1){
						System.out.println("H "+cards[i][j]);
					} i==1 i 1 {
						System.out.println("H "+cards[i][j]);
					} System.out.println("H "+cards[i][j]) System.out.println System.out System System.out "H "+cards[i][j] "H " cards[i][j] cards[i] cards i j if(i==2){
						System.out.println("C "+cards[i][j]);
					} i==2 i 2 {
						System.out.println("C "+cards[i][j]);
					} System.out.println("C "+cards[i][j]) System.out.println System.out System System.out "C "+cards[i][j] "C " cards[i][j] cards[i] cards i j if(i==3){
						System.out.println("D "+cards[i][j]);
					} i==3 i 3 {
						System.out.println("D "+cards[i][j]);
					} System.out.println("D "+cards[i][j]) System.out.println System.out System System.out "D "+cards[i][j] "D " cards[i][j] cards[i] cards i j String [] args args public class Main {
public static void main(String [] args){
		
		Scanner scan = new Scanner(System.in);
		
		int cards[][];
		cards = new int[4][13];
		int i, j, num;
		
		for(i=0; i<4; i++){
			num = 1;
			for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			}
		}
		
		int a = scan.nextInt();
		for(i=0; i<a; i++){
			char op = scan.next().charAt(0);
			int c = scan.nextInt();
			
			if(op == 'S'){
				cards[0][c-1] = 0; 
			}
			if(op == 'H'){
				cards[1][c-1] = 0; 
			}
			if(op == 'C'){
				cards[2][c-1] = 0; 
			}
			if(op == 'D'){
				cards[3][c-1] = 0; 
			}
		}
		
		for(i=0; i<4; i++){
			for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			}
		}
		
	}
} public class Main {
public static void main(String [] args){
		
		Scanner scan = new Scanner(System.in);
		
		int cards[][];
		cards = new int[4][13];
		int i, j, num;
		
		for(i=0; i<4; i++){
			num = 1;
			for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			}
		}
		
		int a = scan.nextInt();
		for(i=0; i<a; i++){
			char op = scan.next().charAt(0);
			int c = scan.nextInt();
			
			if(op == 'S'){
				cards[0][c-1] = 0; 
			}
			if(op == 'H'){
				cards[1][c-1] = 0; 
			}
			if(op == 'C'){
				cards[2][c-1] = 0; 
			}
			if(op == 'D'){
				cards[3][c-1] = 0; 
			}
		}
		
		for(i=0; i<4; i++){
			for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			}
		}
		
	}
} Main
import java.util.Scanner;

public class Main {
public static void main(String [] args){
		
		Scanner scan = new Scanner(System.in);
		
		int cards[][];
		cards = new int[4][13];
		int i, j, num;
		
		for(i=0; i<4; i++){
			num = 1;
			for(j=0; j<13; j++){
				cards[i][j] = num;
				num++;
			}
		}
		
		int a = scan.nextInt();
		for(i=0; i<a; i++){
			char op = scan.next().charAt(0);
			int c = scan.nextInt();
			
			if(op == 'S'){
				cards[0][c-1] = 0; 
			}
			if(op == 'H'){
				cards[1][c-1] = 0; 
			}
			if(op == 'C'){
				cards[2][c-1] = 0; 
			}
			if(op == 'D'){
				cards[3][c-1] = 0; 
			}
		}
		
		for(i=0; i<4; i++){
			for(j=0; j<13; j++){
				if(cards[i][j] != 0){
					if(i==0){
						System.out.println("S "+cards[i][j]);
					}
					if(i==1){
						System.out.println("H "+cards[i][j]);
					}
					if(i==2){
						System.out.println("C "+cards[i][j]);
					}
					if(i==3){
						System.out.println("D "+cards[i][j]);
					}
					
				}
			}
		}
		
	}
}