import java.io.*;

class Main {
	public static void main(String[] args){
		try{ 
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String buf = br.readLine();
			
			int n = Integer.parseInt(buf);
			int [][] a = new int [4][13];
			
			for(int i = 0;i < n;i++){
				buf = br.readLine();
				String[] line = buf.split(" ");
				String mark = line[0]; 
				int s = Integer.parseInt(line[1]);
				if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				}
			}
			
			
			for(int i = 0; i< 4;i++){
				for(int j = 0;j<13;j++){
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				}
			}
		} catch(Exception e){
		}
	}
} import java.io.*; io.* java class Main {
	public static void main(String[] args){
		try{ 
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String buf = br.readLine();
			
			int n = Integer.parseInt(buf);
			int [][] a = new int [4][13];
			
			for(int i = 0;i < n;i++){
				buf = br.readLine();
				String[] line = buf.split(" ");
				String mark = line[0]; 
				int s = Integer.parseInt(line[1]);
				if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				}
			}
			
			
			for(int i = 0; i< 4;i++){
				for(int j = 0;j<13;j++){
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				}
			}
		} catch(Exception e){
		}
	}
} Main public static void main(String[] args){
		try{ 
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String buf = br.readLine();
			
			int n = Integer.parseInt(buf);
			int [][] a = new int [4][13];
			
			for(int i = 0;i < n;i++){
				buf = br.readLine();
				String[] line = buf.split(" ");
				String mark = line[0]; 
				int s = Integer.parseInt(line[1]);
				if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				}
			}
			
			
			for(int i = 0; i< 4;i++){
				for(int j = 0;j<13;j++){
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				}
			}
		} catch(Exception e){
		}
	} main {
		try{ 
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String buf = br.readLine();
			
			int n = Integer.parseInt(buf);
			int [][] a = new int [4][13];
			
			for(int i = 0;i < n;i++){
				buf = br.readLine();
				String[] line = buf.split(" ");
				String mark = line[0]; 
				int s = Integer.parseInt(line[1]);
				if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				}
			}
			
			
			for(int i = 0; i< 4;i++){
				for(int j = 0;j<13;j++){
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				}
			}
		} catch(Exception e){
		}
	} try{ 
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String buf = br.readLine();
			
			int n = Integer.parseInt(buf);
			int [][] a = new int [4][13];
			
			for(int i = 0;i < n;i++){
				buf = br.readLine();
				String[] line = buf.split(" ");
				String mark = line[0]; 
				int s = Integer.parseInt(line[1]);
				if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				}
			}
			
			
			for(int i = 0; i< 4;i++){
				for(int j = 0;j<13;j++){
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				}
			}
		} catch(Exception e){
		} catch(Exception e){
		} Exception e {
		} { 
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String buf = br.readLine();
			
			int n = Integer.parseInt(buf);
			int [][] a = new int [4][13];
			
			for(int i = 0;i < n;i++){
				buf = br.readLine();
				String[] line = buf.split(" ");
				String mark = line[0]; 
				int s = Integer.parseInt(line[1]);
				if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				}
			}
			
			
			for(int i = 0; i< 4;i++){
				for(int j = 0;j<13;j++){
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				}
			}
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String buf = br.readLine(); buf br.readLine() br.readLine br int n = Integer.parseInt(buf); n Integer.parseInt(buf) Integer.parseInt Integer buf int [][] a = new int [4][13]; a new int [4][13] 4 13 for(int i = 0;i < n;i++){
				buf = br.readLine();
				String[] line = buf.split(" ");
				String mark = line[0]; 
				int s = Integer.parseInt(line[1]);
				if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				}
			} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
				buf = br.readLine();
				String[] line = buf.split(" ");
				String mark = line[0]; 
				int s = Integer.parseInt(line[1]);
				if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				}
			} {
				buf = br.readLine();
				String[] line = buf.split(" ");
				String mark = line[0]; 
				int s = Integer.parseInt(line[1]);
				if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				}
			} buf = br.readLine() buf br.readLine() br.readLine br String[] line = buf.split(" "); line buf.split(" ") buf.split buf " " String mark = line[0]; mark line[0] line 0 int s = Integer.parseInt(line[1]); s Integer.parseInt(line[1]) Integer.parseInt Integer line[1] line 1 if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				} mark.equals("S") mark.equals mark "S" {
					a[0][s-1] = 1;
				} a[0][s-1] = 1 a[0][s-1] a[0] a 0 s-1 s 1 1 if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				} mark.equals("H") mark.equals mark "H" {
					a[1][s-1] = 1;
				} a[1][s-1] = 1 a[1][s-1] a[1] a 1 s-1 s 1 1 if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				} mark.equals("C") mark.equals mark "C" {
					a[2][s-1] = 1;
				} a[2][s-1] = 1 a[2][s-1] a[2] a 2 s-1 s 1 1 if (mark.equals("D")){
					a[3][s-1] = 1;
				} mark.equals("D") mark.equals mark "D" {
					a[3][s-1] = 1;
				} a[3][s-1] = 1 a[3][s-1] a[3] a 3 s-1 s 1 1 for(int i = 0; i< 4;i++){
				for(int j = 0;j<13;j++){
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(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] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				}
			} {
				for(int j = 0;j<13;j++){
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				}
			} for(int j = 0;j<13;j++){
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				} int j = 0; int j = 0; j 0 j<13 j 13 j++ j++ j {
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				} {
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				} if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					} a[i][j] != 1 a[i][j] a[i] a i j 1 {
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					} if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						} i == 0 i 0 {
							System.out.print("S");
							System.out.println(" "+(j+1));
						} System.out.print("S") System.out.print System.out System System.out "S" System.out.println(" "+(j+1)) System.out.println System.out System System.out " "+(j+1) " " (j+1) j 1 if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						} i == 1 i 1 {
							System.out.print("H");
							System.out.println(" "+(j+1));
						} System.out.print("H") System.out.print System.out System System.out "H" System.out.println(" "+(j+1)) System.out.println System.out System System.out " "+(j+1) " " (j+1) j 1 if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						} i == 2 i 2 {
							System.out.print("C");
							System.out.println(" "+(j+1));
						} System.out.print("C") System.out.print System.out System System.out "C" System.out.println(" "+(j+1)) System.out.println System.out System System.out " "+(j+1) " " (j+1) j 1 if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						} i == 3 i 3 {
							System.out.print("D");
							System.out.println(" "+(j+1));
						} System.out.print("D") System.out.print System.out System System.out "D" System.out.println(" "+(j+1)) System.out.println System.out System System.out " "+(j+1) " " (j+1) j 1 String[] args args
import java.io.*;

class Main {
	public static void main(String[] args){
		try{ 
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String buf = br.readLine();
			
			int n = Integer.parseInt(buf);
			int [][] a = new int [4][13];
			
			for(int i = 0;i < n;i++){
				buf = br.readLine();
				String[] line = buf.split(" ");
				String mark = line[0]; 
				int s = Integer.parseInt(line[1]);
				if(mark.equals("S")){
					a[0][s-1] = 1;
				} else if (mark.equals("H")){
					a[1][s-1] = 1;
				} else if (mark.equals("C")){
					a[2][s-1] = 1;
				} else if (mark.equals("D")){
					a[3][s-1] = 1;
				}
			}
			
			
			for(int i = 0; i< 4;i++){
				for(int j = 0;j<13;j++){
					if(a[i][j] != 1){
						if( i == 0){
							System.out.print("S");
							System.out.println(" "+(j+1));
						}
						if( i == 1){
							System.out.print("H");
							System.out.println(" "+(j+1));
						}
						if( i == 2){
							System.out.print("C");
							System.out.println(" "+(j+1));
						}
						if( i == 3){
							System.out.print("D");
							System.out.println(" "+(j+1));
						}
					}
				}
			}
		} catch(Exception e){
		}
	}
}