import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

class Main{
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter out = new PrintWriter(System.out);
    private static final char[] suites = {'S', 'H', 'C', 'D'};
    static boolean[][] cards = new boolean[4][13];
    public static void main(String[] Args) throws IOException{
        final int n = Integer.parseInt(br.readLine());
        for(int i = 0; i<n; i++){
            final String in = br.readLine();
            final char suit = in.charAt(0);
            final int num = Integer.parseInt(in.substring(2));
            if(suit=='S') cards[0][num-1] = true;
            else if(suit=='H') cards[1][num-1] = true;
            else if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true;
        }
        for(int i = 0; i<4; i++){
            for(int j = 0; j<13; j++){
                if(!cards[i][j]) out.println(suites[i]+" "+ (j+1));
            }
        }
        out.flush();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io class Main{
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter out = new PrintWriter(System.out);
    private static final char[] suites = {'S', 'H', 'C', 'D'};
    static boolean[][] cards = new boolean[4][13];
    public static void main(String[] Args) throws IOException{
        final int n = Integer.parseInt(br.readLine());
        for(int i = 0; i<n; i++){
            final String in = br.readLine();
            final char suit = in.charAt(0);
            final int num = Integer.parseInt(in.substring(2));
            if(suit=='S') cards[0][num-1] = true;
            else if(suit=='H') cards[1][num-1] = true;
            else if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true;
        }
        for(int i = 0; i<4; i++){
            for(int j = 0; j<13; j++){
                if(!cards[i][j]) out.println(suites[i]+" "+ (j+1));
            }
        }
        out.flush();
    }
} Main private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) private static final PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) private static final char[] suites = {'S', 'H', 'C', 'D'}; suites {'S', 'H', 'C', 'D'} 'S' 'H' 'C' 'D' static boolean[][] cards = new boolean[4][13]; cards new boolean[4][13] 4 13 public static void main(String[] Args) throws IOException{
        final int n = Integer.parseInt(br.readLine());
        for(int i = 0; i<n; i++){
            final String in = br.readLine();
            final char suit = in.charAt(0);
            final int num = Integer.parseInt(in.substring(2));
            if(suit=='S') cards[0][num-1] = true;
            else if(suit=='H') cards[1][num-1] = true;
            else if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true;
        }
        for(int i = 0; i<4; i++){
            for(int j = 0; j<13; j++){
                if(!cards[i][j]) out.println(suites[i]+" "+ (j+1));
            }
        }
        out.flush();
    } main {
        final int n = Integer.parseInt(br.readLine());
        for(int i = 0; i<n; i++){
            final String in = br.readLine();
            final char suit = in.charAt(0);
            final int num = Integer.parseInt(in.substring(2));
            if(suit=='S') cards[0][num-1] = true;
            else if(suit=='H') cards[1][num-1] = true;
            else if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true;
        }
        for(int i = 0; i<4; i++){
            for(int j = 0; j<13; j++){
                if(!cards[i][j]) out.println(suites[i]+" "+ (j+1));
            }
        }
        out.flush();
    } final int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i = 0; i<n; i++){
            final String in = br.readLine();
            final char suit = in.charAt(0);
            final int num = Integer.parseInt(in.substring(2));
            if(suit=='S') cards[0][num-1] = true;
            else if(suit=='H') cards[1][num-1] = true;
            else if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true;
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            final String in = br.readLine();
            final char suit = in.charAt(0);
            final int num = Integer.parseInt(in.substring(2));
            if(suit=='S') cards[0][num-1] = true;
            else if(suit=='H') cards[1][num-1] = true;
            else if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true;
        } {
            final String in = br.readLine();
            final char suit = in.charAt(0);
            final int num = Integer.parseInt(in.substring(2));
            if(suit=='S') cards[0][num-1] = true;
            else if(suit=='H') cards[1][num-1] = true;
            else if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true;
        } final String in = br.readLine(); in br.readLine() br.readLine br final char suit = in.charAt(0); suit in.charAt(0) in.charAt in 0 final int num = Integer.parseInt(in.substring(2)); num Integer.parseInt(in.substring(2)) Integer.parseInt Integer in.substring(2) in.substring in 2 if(suit=='S') cards[0][num-1] = true;
            else if(suit=='H') cards[1][num-1] = true;
            else if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true; suit=='S' suit 'S' cards[0][num-1] = true cards[0][num-1] cards[0] cards 0 num-1 num 1 true if(suit=='H') cards[1][num-1] = true;
            else if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true; suit=='H' suit 'H' cards[1][num-1] = true cards[1][num-1] cards[1] cards 1 num-1 num 1 true if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true; suit=='C' suit 'C' cards[2][num-1] = true cards[2][num-1] cards[2] cards 2 num-1 num 1 true if(suit=='D') cards[3][num-1] = true; suit=='D' suit 'D' cards[3][num-1] = true cards[3][num-1] cards[3] cards 3 num-1 num 1 true for(int i = 0; i<4; i++){
            for(int j = 0; j<13; j++){
                if(!cards[i][j]) out.println(suites[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(!cards[i][j]) out.println(suites[i]+" "+ (j+1));
            }
        } {
            for(int j = 0; j<13; j++){
                if(!cards[i][j]) out.println(suites[i]+" "+ (j+1));
            }
        } for(int j = 0; j<13; j++){
                if(!cards[i][j]) out.println(suites[i]+" "+ (j+1));
            } int j = 0; int j = 0; j 0 j<13 j 13 j++ j++ j {
                if(!cards[i][j]) out.println(suites[i]+" "+ (j+1));
            } {
                if(!cards[i][j]) out.println(suites[i]+" "+ (j+1));
            } if(!cards[i][j]) out.println(suites[i]+" "+ (j+1)); !cards[i][j] cards[i][j] cards[i] cards i j out.println(suites[i]+" "+ (j+1)) out.println out suites[i]+" "+ (j+1) suites[i]+" "+ (j+1) suites[i] suites i " " (j+1) j 1 out.flush() out.flush out String[] Args Args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

class Main{
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static final PrintWriter out = new PrintWriter(System.out);
    private static final char[] suites = {'S', 'H', 'C', 'D'};
    static boolean[][] cards = new boolean[4][13];
    public static void main(String[] Args) throws IOException{
        final int n = Integer.parseInt(br.readLine());
        for(int i = 0; i<n; i++){
            final String in = br.readLine();
            final char suit = in.charAt(0);
            final int num = Integer.parseInt(in.substring(2));
            if(suit=='S') cards[0][num-1] = true;
            else if(suit=='H') cards[1][num-1] = true;
            else if(suit=='C') cards[2][num-1] = true;
            else if(suit=='D') cards[3][num-1] = true;
        }
        for(int i = 0; i<4; i++){
            for(int j = 0; j<13; j++){
                if(!cards[i][j]) out.println(suites[i]+" "+ (j+1));
            }
        }
        out.flush();
    }
}