import java.io.*;

class Main{

    public static void main(String[] args)throws IOException{
	final BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int[][] card=new int[4][];
	for(int i=0;i<4;i++) card[i]=new int[13];
	for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		card[i][j]=0;
	    }
	}
	
	
	String str=br.readLine();
	int n=Integer.parseInt(str);
	for(int i=0;i<n;i++){
	    String[] st=br.readLine().split(" ");
	    String mark=st[0];
	    int num=Integer.parseInt(st[1]);
	    if(mark.equals("S")) card[0][num-1]++;
	    else if(mark.equals("H")) card[1][num-1]++;
	    else if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++;
	}
	for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		}
	    }
	}
    }
}
     import java.io.*; io.* java class Main{

    public static void main(String[] args)throws IOException{
	final BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int[][] card=new int[4][];
	for(int i=0;i<4;i++) card[i]=new int[13];
	for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		card[i][j]=0;
	    }
	}
	
	
	String str=br.readLine();
	int n=Integer.parseInt(str);
	for(int i=0;i<n;i++){
	    String[] st=br.readLine().split(" ");
	    String mark=st[0];
	    int num=Integer.parseInt(st[1]);
	    if(mark.equals("S")) card[0][num-1]++;
	    else if(mark.equals("H")) card[1][num-1]++;
	    else if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++;
	}
	for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		}
	    }
	}
    }
} Main public static void main(String[] args)throws IOException{
	final BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int[][] card=new int[4][];
	for(int i=0;i<4;i++) card[i]=new int[13];
	for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		card[i][j]=0;
	    }
	}
	
	
	String str=br.readLine();
	int n=Integer.parseInt(str);
	for(int i=0;i<n;i++){
	    String[] st=br.readLine().split(" ");
	    String mark=st[0];
	    int num=Integer.parseInt(st[1]);
	    if(mark.equals("S")) card[0][num-1]++;
	    else if(mark.equals("H")) card[1][num-1]++;
	    else if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++;
	}
	for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		}
	    }
	}
    } main {
	final BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int[][] card=new int[4][];
	for(int i=0;i<4;i++) card[i]=new int[13];
	for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		card[i][j]=0;
	    }
	}
	
	
	String str=br.readLine();
	int n=Integer.parseInt(str);
	for(int i=0;i<n;i++){
	    String[] st=br.readLine().split(" ");
	    String mark=st[0];
	    int num=Integer.parseInt(st[1]);
	    if(mark.equals("S")) card[0][num-1]++;
	    else if(mark.equals("H")) card[1][num-1]++;
	    else if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++;
	}
	for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		}
	    }
	}
    } final BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int[][] card=new int[4][]; card new int[4][] 4 for(int i=0;i<4;i++) card[i]=new int[13]; int i=0; int i=0; i 0 i<4 i 4 i++ i++ i card[i]=new int[13]; card[i]=new int[13] card[i] card i new int[13] 13 for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		card[i][j]=0;
	    }
	} int i=0; int i=0; i 0 i<4 i 4 i++ i++ i {
	    for(int j=0;j<13;j++){
		card[i][j]=0;
	    }
	} {
	    for(int j=0;j<13;j++){
		card[i][j]=0;
	    }
	} for(int j=0;j<13;j++){
		card[i][j]=0;
	    } int j=0; int j=0; j 0 j<13 j 13 j++ j++ j {
		card[i][j]=0;
	    } {
		card[i][j]=0;
	    } card[i][j]=0 card[i][j] card[i] card i j 0 String str=br.readLine(); str br.readLine() br.readLine br int n=Integer.parseInt(str); n Integer.parseInt(str) Integer.parseInt Integer str for(int i=0;i<n;i++){
	    String[] st=br.readLine().split(" ");
	    String mark=st[0];
	    int num=Integer.parseInt(st[1]);
	    if(mark.equals("S")) card[0][num-1]++;
	    else if(mark.equals("H")) card[1][num-1]++;
	    else if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++;
	} int i=0; int i=0; i 0 i<n i n i++ i++ i {
	    String[] st=br.readLine().split(" ");
	    String mark=st[0];
	    int num=Integer.parseInt(st[1]);
	    if(mark.equals("S")) card[0][num-1]++;
	    else if(mark.equals("H")) card[1][num-1]++;
	    else if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++;
	} {
	    String[] st=br.readLine().split(" ");
	    String mark=st[0];
	    int num=Integer.parseInt(st[1]);
	    if(mark.equals("S")) card[0][num-1]++;
	    else if(mark.equals("H")) card[1][num-1]++;
	    else if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++;
	} String[] st=br.readLine().split(" "); st br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " String mark=st[0]; mark st[0] st 0 int num=Integer.parseInt(st[1]); num Integer.parseInt(st[1]) Integer.parseInt Integer st[1] st 1 if(mark.equals("S")) card[0][num-1]++;
	    else if(mark.equals("H")) card[1][num-1]++;
	    else if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++; mark.equals("S") mark.equals mark "S" card[0][num-1]++ card[0][num-1] card[0] card 0 num-1 num 1 if(mark.equals("H")) card[1][num-1]++;
	    else if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++; mark.equals("H") mark.equals mark "H" card[1][num-1]++ card[1][num-1] card[1] card 1 num-1 num 1 if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++; mark.equals("C") mark.equals mark "C" card[2][num-1]++ card[2][num-1] card[2] card 2 num-1 num 1 if(mark.equals("D")) card[3][num-1]++; mark.equals("D") mark.equals mark "D" card[3][num-1]++ card[3][num-1] card[3] card 3 num-1 num 1 for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (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(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		}
	    }
	} {
	    for(int j=0;j<13;j++){
		if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		}
	    }
	} for(int j=0;j<13;j++){
		if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		}
	    } int j=0; int j=0; j 0 j<13 j 13 j++ j++ j {
		if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		}
	    } {
		if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		}
	    } if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		} card[i][j]==0 card[i][j] card[i] card i j 0 {
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		} if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1)); i==0 i 0 System.out.println("S " + (j+1)) System.out.println System.out System System.out "S " + (j+1) "S " (j+1) j 1 if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1)); i==1 i 1 System.out.println("H " + (j+1)) System.out.println System.out System System.out "H " + (j+1) "H " (j+1) j 1 if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1)); i==2 i 2 System.out.println("C " + (j+1)) System.out.println System.out System System.out "C " + (j+1) "C " (j+1) j 1 if(i==3) System.out.println("D " + (j+1)); i==3 i 3 System.out.println("D " + (j+1)) System.out.println System.out System System.out "D " + (j+1) "D " (j+1) j 1 String[] args args
import java.io.*;

class Main{

    public static void main(String[] args)throws IOException{
	final BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
	int[][] card=new int[4][];
	for(int i=0;i<4;i++) card[i]=new int[13];
	for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		card[i][j]=0;
	    }
	}
	
	
	String str=br.readLine();
	int n=Integer.parseInt(str);
	for(int i=0;i<n;i++){
	    String[] st=br.readLine().split(" ");
	    String mark=st[0];
	    int num=Integer.parseInt(st[1]);
	    if(mark.equals("S")) card[0][num-1]++;
	    else if(mark.equals("H")) card[1][num-1]++;
	    else if(mark.equals("C")) card[2][num-1]++;	
	    else if(mark.equals("D")) card[3][num-1]++;
	}
	for(int i=0;i<4;i++){
	    for(int j=0;j<13;j++){
		if(card[i][j]==0){
		    if(i==0) System.out.println("S " + (j+1));
		    else if(i==1) System.out.println("H " + (j+1));
		    else if(i==2) System.out.println("C " + (j+1));
		    else if(i==3) System.out.println("D " + (j+1));
		}
	    }
	}
    }
}
    