import java.io.*;

public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());  //?????£??????????????????????????°?????\????????????
	    String[] cards ;
	    
   //??¨???????????????????¨????????????¶?????????????????????????????????.
	    Boolean[] S = new Boolean[13];
	    Boolean[] H = new Boolean[13];
	    Boolean[] C = new Boolean[13];
	    Boolean[] D = new Boolean[13];
	    
	    for(int i = 0; i < 13 ; i++) {
	    	S[i] = false ;
	    	H[i] = false ;
	    	C[i] = false ;
	    	D[i] = false ;
	    }
	
	//?????£??????????????????????????¨???????????????????¨?????????\???????????????????????????
	    for(int j = 0 ; j < n ; j ++) {
	    	cards = br.readLine().split(" ");
	    	int x = Integer.parseInt(cards[1]);
	    	
	//??????????????¶????????????????????????   	
	    	switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	}
	    }
	 
	//4?¨???????????????????????????£????????????????????????????????????????????????????????????    
	    int j = 0 ;
	    while( j < 4) {
	    	for(int i = 0; i < 13 ; i++) {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	}
	    	j++;
	    }
	    
	}
} import java.io.*; io.* java public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());  //?????£??????????????????????????°?????\????????????
	    String[] cards ;
	    
   //??¨???????????????????¨????????????¶?????????????????????????????????.
	    Boolean[] S = new Boolean[13];
	    Boolean[] H = new Boolean[13];
	    Boolean[] C = new Boolean[13];
	    Boolean[] D = new Boolean[13];
	    
	    for(int i = 0; i < 13 ; i++) {
	    	S[i] = false ;
	    	H[i] = false ;
	    	C[i] = false ;
	    	D[i] = false ;
	    }
	
	//?????£??????????????????????????¨???????????????????¨?????????\???????????????????????????
	    for(int j = 0 ; j < n ; j ++) {
	    	cards = br.readLine().split(" ");
	    	int x = Integer.parseInt(cards[1]);
	    	
	//??????????????¶????????????????????????   	
	    	switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	}
	    }
	 
	//4?¨???????????????????????????£????????????????????????????????????????????????????????????    
	    int j = 0 ;
	    while( j < 4) {
	    	for(int i = 0; i < 13 ; i++) {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	}
	    	j++;
	    }
	    
	}
} Main public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());  //?????£??????????????????????????°?????\????????????
	    String[] cards ;
	    
   //??¨???????????????????¨????????????¶?????????????????????????????????.
	    Boolean[] S = new Boolean[13];
	    Boolean[] H = new Boolean[13];
	    Boolean[] C = new Boolean[13];
	    Boolean[] D = new Boolean[13];
	    
	    for(int i = 0; i < 13 ; i++) {
	    	S[i] = false ;
	    	H[i] = false ;
	    	C[i] = false ;
	    	D[i] = false ;
	    }
	
	//?????£??????????????????????????¨???????????????????¨?????????\???????????????????????????
	    for(int j = 0 ; j < n ; j ++) {
	    	cards = br.readLine().split(" ");
	    	int x = Integer.parseInt(cards[1]);
	    	
	//??????????????¶????????????????????????   	
	    	switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	}
	    }
	 
	//4?¨???????????????????????????£????????????????????????????????????????????????????????????    
	    int j = 0 ;
	    while( j < 4) {
	    	for(int i = 0; i < 13 ; i++) {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	}
	    	j++;
	    }
	    
	} main {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());  //?????£??????????????????????????°?????\????????????
	    String[] cards ;
	    
   //??¨???????????????????¨????????????¶?????????????????????????????????.
	    Boolean[] S = new Boolean[13];
	    Boolean[] H = new Boolean[13];
	    Boolean[] C = new Boolean[13];
	    Boolean[] D = new Boolean[13];
	    
	    for(int i = 0; i < 13 ; i++) {
	    	S[i] = false ;
	    	H[i] = false ;
	    	C[i] = false ;
	    	D[i] = false ;
	    }
	
	//?????£??????????????????????????¨???????????????????¨?????????\???????????????????????????
	    for(int j = 0 ; j < n ; j ++) {
	    	cards = br.readLine().split(" ");
	    	int x = Integer.parseInt(cards[1]);
	    	
	//??????????????¶????????????????????????   	
	    	switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	}
	    }
	 
	//4?¨???????????????????????????£????????????????????????????????????????????????????????????    
	    int j = 0 ;
	    while( j < 4) {
	    	for(int i = 0; i < 13 ; i++) {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	}
	    	j++;
	    }
	    
	} BufferedReader br = new BufferedReader (new InputStreamReader(System.in)); br new BufferedReader (new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br String[] cards ; cards Boolean[] S = new Boolean[13]; S new Boolean[13] 13 Boolean[] H = new Boolean[13]; H new Boolean[13] 13 Boolean[] C = new Boolean[13]; C new Boolean[13] 13 Boolean[] D = new Boolean[13]; D new Boolean[13] 13 for(int i = 0; i < 13 ; i++) {
	    	S[i] = false ;
	    	H[i] = false ;
	    	C[i] = false ;
	    	D[i] = false ;
	    } int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
	    	S[i] = false ;
	    	H[i] = false ;
	    	C[i] = false ;
	    	D[i] = false ;
	    } {
	    	S[i] = false ;
	    	H[i] = false ;
	    	C[i] = false ;
	    	D[i] = false ;
	    } S[i] = false S[i] S i false H[i] = false H[i] H i false C[i] = false C[i] C i false D[i] = false D[i] D i false for(int j = 0 ; j < n ; j ++) {
	    	cards = br.readLine().split(" ");
	    	int x = Integer.parseInt(cards[1]);
	    	
	//??????????????¶????????????????????????   	
	    	switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	}
	    } int j = 0 ; int j = 0 ; j 0 j < n j n j ++ j ++ j {
	    	cards = br.readLine().split(" ");
	    	int x = Integer.parseInt(cards[1]);
	    	
	//??????????????¶????????????????????????   	
	    	switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	}
	    } {
	    	cards = br.readLine().split(" ");
	    	int x = Integer.parseInt(cards[1]);
	    	
	//??????????????¶????????????????????????   	
	    	switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	}
	    } cards = br.readLine().split(" ") cards br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int x = Integer.parseInt(cards[1]); x Integer.parseInt(cards[1]) Integer.parseInt Integer cards[1] cards 1 switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	} cards[0].charAt(0) cards[0].charAt cards[0] cards 0 0 case 'S' : 'S' case 'S' : S[x-1] = true S[x-1] S x-1 x 1 true break ; case 'H' : 'H' case 'H' : H[x-1] = true H[x-1] H x-1 x 1 true break ; case 'C' : 'C' case 'C' : C[x-1] = true C[x-1] C x-1 x 1 true break ; case 'D' : 'D' case 'D' : D[x-1] = true D[x-1] D x-1 x 1 true break ; int j = 0 ; j 0 while( j < 4) {
	    	for(int i = 0; i < 13 ; i++) {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	}
	    	j++;
	    } j < 4 j 4 {
	    	for(int i = 0; i < 13 ; i++) {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	}
	    	j++;
	    } for(int i = 0; i < 13 ; i++) {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	} int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	} {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	} switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		} j case 0 : 0 case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); S[i] == false S[i] S i false System.out.println("S" + " " + (i+1)) System.out.println System.out System System.out "S" + " " + (i+1) "S" + " " + (i+1) "S" " " (i+1) i 1 break ; case 1 : 1 case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); H[i] == false H[i] H i false System.out.println("H" + " " + (i+1)) System.out.println System.out System System.out "H" + " " + (i+1) "H" + " " + (i+1) "H" " " (i+1) i 1 break ; case 2 : 2 case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); C[i] == false C[i] C i false System.out.println("C" + " " + (i+1)) System.out.println System.out System System.out "C" + " " + (i+1) "C" + " " + (i+1) "C" " " (i+1) i 1 break ; case 3 : 3 case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); D[i] == false D[i] D i false System.out.println("D" + " " + (i+1)) System.out.println System.out System System.out "D" + " " + (i+1) "D" + " " + (i+1) "D" " " (i+1) i 1 break ; j++ j String[] args args public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());  //?????£??????????????????????????°?????\????????????
	    String[] cards ;
	    
   //??¨???????????????????¨????????????¶?????????????????????????????????.
	    Boolean[] S = new Boolean[13];
	    Boolean[] H = new Boolean[13];
	    Boolean[] C = new Boolean[13];
	    Boolean[] D = new Boolean[13];
	    
	    for(int i = 0; i < 13 ; i++) {
	    	S[i] = false ;
	    	H[i] = false ;
	    	C[i] = false ;
	    	D[i] = false ;
	    }
	
	//?????£??????????????????????????¨???????????????????¨?????????\???????????????????????????
	    for(int j = 0 ; j < n ; j ++) {
	    	cards = br.readLine().split(" ");
	    	int x = Integer.parseInt(cards[1]);
	    	
	//??????????????¶????????????????????????   	
	    	switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	}
	    }
	 
	//4?¨???????????????????????????£????????????????????????????????????????????????????????????    
	    int j = 0 ;
	    while( j < 4) {
	    	for(int i = 0; i < 13 ; i++) {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	}
	    	j++;
	    }
	    
	}
} public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());  //?????£??????????????????????????°?????\????????????
	    String[] cards ;
	    
   //??¨???????????????????¨????????????¶?????????????????????????????????.
	    Boolean[] S = new Boolean[13];
	    Boolean[] H = new Boolean[13];
	    Boolean[] C = new Boolean[13];
	    Boolean[] D = new Boolean[13];
	    
	    for(int i = 0; i < 13 ; i++) {
	    	S[i] = false ;
	    	H[i] = false ;
	    	C[i] = false ;
	    	D[i] = false ;
	    }
	
	//?????£??????????????????????????¨???????????????????¨?????????\???????????????????????????
	    for(int j = 0 ; j < n ; j ++) {
	    	cards = br.readLine().split(" ");
	    	int x = Integer.parseInt(cards[1]);
	    	
	//??????????????¶????????????????????????   	
	    	switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	}
	    }
	 
	//4?¨???????????????????????????£????????????????????????????????????????????????????????????    
	    int j = 0 ;
	    while( j < 4) {
	    	for(int i = 0; i < 13 ; i++) {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	}
	    	j++;
	    }
	    
	}
} Main
import java.io.*;

public class Main {
	public static void main(String[] args)throws IOException {
		BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
		
		int n = Integer.parseInt(br.readLine());  //?????£??????????????????????????°?????\????????????
	    String[] cards ;
	    
   //??¨???????????????????¨????????????¶?????????????????????????????????.
	    Boolean[] S = new Boolean[13];
	    Boolean[] H = new Boolean[13];
	    Boolean[] C = new Boolean[13];
	    Boolean[] D = new Boolean[13];
	    
	    for(int i = 0; i < 13 ; i++) {
	    	S[i] = false ;
	    	H[i] = false ;
	    	C[i] = false ;
	    	D[i] = false ;
	    }
	
	//?????£??????????????????????????¨???????????????????¨?????????\???????????????????????????
	    for(int j = 0 ; j < n ; j ++) {
	    	cards = br.readLine().split(" ");
	    	int x = Integer.parseInt(cards[1]);
	    	
	//??????????????¶????????????????????????   	
	    	switch(cards[0].charAt(0)){
	    	      case 'S' : S[x-1] = true ; break ;
	    	      case 'H' : H[x-1] = true ; break ;
	    	      case 'C' : C[x-1] = true ; break ;
	    	      case 'D' : D[x-1] = true ; break ;
	    	}
	    }
	 
	//4?¨???????????????????????????£????????????????????????????????????????????????????????????    
	    int j = 0 ;
	    while( j < 4) {
	    	for(int i = 0; i < 13 ; i++) {
	    		switch(j) {
	    		      case 0 : if( S[i] == false ) 
	    		       System.out.println("S" + " " + (i+1)); break ;
	    		      case 1 : if( H[i] == false ) 
   		    	       System.out.println("H" + " " + (i+1)); break ;
	    		      case 2 : if( C[i] == false ) 
   		    	       System.out.println("C" + " " + (i+1)); break ;
	    		      case 3 : if( D[i] == false ) 
   		    	       System.out.println("D" + " " + (i+1)); break ;
	    		}
	    	}
	    	j++;
	    }
	    
	}
}