import java.util.Scanner;


class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        boolean[][] card = new boolean[4][13];
        int number = scan.nextInt();

        if (number == 52) {
            return;
        }
        while(number != 0) {
            char image = scan.next().charAt(0);
            int num = scan.nextInt() - 1;

            switch (image) {
                case 'S':
                    card[0][num] = true;
                    break;
                case 'H':
                    card[1][num] = true;
                    break;
                case 'C':
                    card[2][num] = true;
                    break;
                case 'D':
                    card[3][num] = true;
                    break;
            }
            number--;
        }
        for (int i = 0; i < 4; i++) {
            for(int j = 0; j < 13; j++) {
                if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            }
        }
        sb.delete(sb.length() - 1, sb.length());
        System.out.println(sb);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        boolean[][] card = new boolean[4][13];
        int number = scan.nextInt();

        if (number == 52) {
            return;
        }
        while(number != 0) {
            char image = scan.next().charAt(0);
            int num = scan.nextInt() - 1;

            switch (image) {
                case 'S':
                    card[0][num] = true;
                    break;
                case 'H':
                    card[1][num] = true;
                    break;
                case 'C':
                    card[2][num] = true;
                    break;
                case 'D':
                    card[3][num] = true;
                    break;
            }
            number--;
        }
        for (int i = 0; i < 4; i++) {
            for(int j = 0; j < 13; j++) {
                if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            }
        }
        sb.delete(sb.length() - 1, sb.length());
        System.out.println(sb);
    }
} Main public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        boolean[][] card = new boolean[4][13];
        int number = scan.nextInt();

        if (number == 52) {
            return;
        }
        while(number != 0) {
            char image = scan.next().charAt(0);
            int num = scan.nextInt() - 1;

            switch (image) {
                case 'S':
                    card[0][num] = true;
                    break;
                case 'H':
                    card[1][num] = true;
                    break;
                case 'C':
                    card[2][num] = true;
                    break;
                case 'D':
                    card[3][num] = true;
                    break;
            }
            number--;
        }
        for (int i = 0; i < 4; i++) {
            for(int j = 0; j < 13; j++) {
                if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            }
        }
        sb.delete(sb.length() - 1, sb.length());
        System.out.println(sb);
    } main {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        boolean[][] card = new boolean[4][13];
        int number = scan.nextInt();

        if (number == 52) {
            return;
        }
        while(number != 0) {
            char image = scan.next().charAt(0);
            int num = scan.nextInt() - 1;

            switch (image) {
                case 'S':
                    card[0][num] = true;
                    break;
                case 'H':
                    card[1][num] = true;
                    break;
                case 'C':
                    card[2][num] = true;
                    break;
                case 'D':
                    card[3][num] = true;
                    break;
            }
            number--;
        }
        for (int i = 0; i < 4; i++) {
            for(int j = 0; j < 13; j++) {
                if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            }
        }
        sb.delete(sb.length() - 1, sb.length());
        System.out.println(sb);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() boolean[][] card = new boolean[4][13]; card new boolean[4][13] 4 13 int number = scan.nextInt(); number scan.nextInt() scan.nextInt scan if (number == 52) {
            return;
        } number == 52 number 52 {
            return;
        } return; while(number != 0) {
            char image = scan.next().charAt(0);
            int num = scan.nextInt() - 1;

            switch (image) {
                case 'S':
                    card[0][num] = true;
                    break;
                case 'H':
                    card[1][num] = true;
                    break;
                case 'C':
                    card[2][num] = true;
                    break;
                case 'D':
                    card[3][num] = true;
                    break;
            }
            number--;
        } number != 0 number 0 {
            char image = scan.next().charAt(0);
            int num = scan.nextInt() - 1;

            switch (image) {
                case 'S':
                    card[0][num] = true;
                    break;
                case 'H':
                    card[1][num] = true;
                    break;
                case 'C':
                    card[2][num] = true;
                    break;
                case 'D':
                    card[3][num] = true;
                    break;
            }
            number--;
        } char image = scan.next().charAt(0); image scan.next().charAt(0) scan.next().charAt scan.next() scan.next scan 0 int num = scan.nextInt() - 1; num scan.nextInt() - 1 scan.nextInt() scan.nextInt scan 1 switch (image) {
                case 'S':
                    card[0][num] = true;
                    break;
                case 'H':
                    card[1][num] = true;
                    break;
                case 'C':
                    card[2][num] = true;
                    break;
                case 'D':
                    card[3][num] = true;
                    break;
            } image case 'S': 'S' case 'S': card[0][num] = true card[0][num] card[0] card 0 num true break; case 'H': 'H' case 'H': card[1][num] = true card[1][num] card[1] card 1 num true break; case 'C': 'C' case 'C': card[2][num] = true card[2][num] card[2] card 2 num true break; case 'D': 'D' case 'D': card[3][num] = true card[3][num] card[3] card 3 num true break; number-- number for (int i = 0; i < 4; i++) {
            for(int j = 0; j < 13; j++) {
                if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            }
        } 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] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            }
        } {
            for(int j = 0; j < 13; j++) {
                if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            }
        } for(int j = 0; j < 13; j++) {
                if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            } int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
                if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            } {
                if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            } if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                } card[i][j] == false card[i][j] card[i] card i j false {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                } switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    } i case 0: 0 case 0: sb.append("S").append(" ").append(j + 1).append("\n") sb.append("S").append(" ").append(j + 1).append sb.append("S").append(" ").append(j + 1) sb.append("S").append(" ").append sb.append("S").append(" ") sb.append("S").append sb.append("S") sb.append sb "S" " " j + 1 j 1 "\n" break; case 1: 1 case 1: sb.append("H").append(" ").append(j + 1).append("\n") sb.append("H").append(" ").append(j + 1).append sb.append("H").append(" ").append(j + 1) sb.append("H").append(" ").append sb.append("H").append(" ") sb.append("H").append sb.append("H") sb.append sb "H" " " j + 1 j 1 "\n" break; case 2: 2 case 2: sb.append("C").append(" ").append(j + 1).append("\n") sb.append("C").append(" ").append(j + 1).append sb.append("C").append(" ").append(j + 1) sb.append("C").append(" ").append sb.append("C").append(" ") sb.append("C").append sb.append("C") sb.append sb "C" " " j + 1 j 1 "\n" break; case 3: 3 case 3: sb.append("D").append(" ").append(j + 1).append("\n") sb.append("D").append(" ").append(j + 1).append sb.append("D").append(" ").append(j + 1) sb.append("D").append(" ").append sb.append("D").append(" ") sb.append("D").append sb.append("D") sb.append sb "D" " " j + 1 j 1 "\n" break; sb.delete(sb.length() - 1, sb.length()) sb.delete sb sb.length() - 1 sb.length() sb.length sb 1 sb.length() sb.length sb System.out.println(sb) System.out.println System.out System System.out sb String args[] args
import java.util.Scanner;


class Main {
    public static void main(String args[]) {
        Scanner scan = new Scanner(System.in);
        StringBuilder sb = new StringBuilder();
        boolean[][] card = new boolean[4][13];
        int number = scan.nextInt();

        if (number == 52) {
            return;
        }
        while(number != 0) {
            char image = scan.next().charAt(0);
            int num = scan.nextInt() - 1;

            switch (image) {
                case 'S':
                    card[0][num] = true;
                    break;
                case 'H':
                    card[1][num] = true;
                    break;
                case 'C':
                    card[2][num] = true;
                    break;
                case 'D':
                    card[3][num] = true;
                    break;
            }
            number--;
        }
        for (int i = 0; i < 4; i++) {
            for(int j = 0; j < 13; j++) {
                if (card[i][j] == false) {
                    switch(i) {
                        case 0:
                            sb.append("S").append(" ").append(j + 1).append("\n");
                            break;
                        case 1:
                            sb.append("H").append(" ").append(j + 1).append("\n");
                            break;
                        case 2:
                            sb.append("C").append(" ").append(j + 1).append("\n");
                            break;
                        case 3:
                            sb.append("D").append(" ").append(j + 1).append("\n");
                            break;
                    }
                }
            }
        }
        sb.delete(sb.length() - 1, sb.length());
        System.out.println(sb);
    }
}