import java.util.Scanner;

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

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

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

} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        boolean[][] cards = new boolean[4][13];
        int n = scan.nextInt();

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

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

} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        boolean[][] cards = new boolean[4][13];
        int n = scan.nextInt();

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

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

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

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

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

            switch (image) {
                case 'S':
                    cards[0][num] = true;
                    break;
                case 'H':
                    cards[1][num] = true;
                    break;
                case 'C':
                    cards[2][num] = true;
                    break;
                case 'D':
                    cards[3][num] = true;
                    break;
            }
            n--;
        } 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':
                    cards[0][num] = true;
                    break;
                case 'H':
                    cards[1][num] = true;
                    break;
                case 'C':
                    cards[2][num] = true;
                    break;
                case 'D':
                    cards[3][num] = true;
                    break;
            } image case 'S': 'S' case 'S': cards[0][num] = true cards[0][num] cards[0] cards 0 num true break; case 'H': 'H' case 'H': cards[1][num] = true cards[1][num] cards[1] cards 1 num true break; case 'C': 'C' case 'C': cards[2][num] = true cards[2][num] cards[2] cards 2 num true break; case 'D': 'D' case 'D': cards[3][num] = true cards[3][num] cards[3] cards 3 num true break; n-- n for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 13; j++) {
                if (cards[i][j] == false) {
                    switch (i) {
                        case 0:
                            System.out.println("S " + (j + 1));
                            break;
                        case 1:
                            System.out.println("H " + (j + 1));
                            break;
                        case 2:
                            System.out.println("C " + (j + 1));
                            break;
                        case 3:
                            System.out.println("D " + (j + 1));
                            break;
                    }
                }
            }
        } 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] == false) {
                    switch (i) {
                        case 0:
                            System.out.println("S " + (j + 1));
                            break;
                        case 1:
                            System.out.println("H " + (j + 1));
                            break;
                        case 2:
                            System.out.println("C " + (j + 1));
                            break;
                        case 3:
                            System.out.println("D " + (j + 1));
                            break;
                    }
                }
            }
        } {
            for (int j = 0; j < 13; j++) {
                if (cards[i][j] == false) {
                    switch (i) {
                        case 0:
                            System.out.println("S " + (j + 1));
                            break;
                        case 1:
                            System.out.println("H " + (j + 1));
                            break;
                        case 2:
                            System.out.println("C " + (j + 1));
                            break;
                        case 3:
                            System.out.println("D " + (j + 1));
                            break;
                    }
                }
            }
        } for (int j = 0; j < 13; j++) {
                if (cards[i][j] == false) {
                    switch (i) {
                        case 0:
                            System.out.println("S " + (j + 1));
                            break;
                        case 1:
                            System.out.println("H " + (j + 1));
                            break;
                        case 2:
                            System.out.println("C " + (j + 1));
                            break;
                        case 3:
                            System.out.println("D " + (j + 1));
                            break;
                    }
                }
            } int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
                if (cards[i][j] == false) {
                    switch (i) {
                        case 0:
                            System.out.println("S " + (j + 1));
                            break;
                        case 1:
                            System.out.println("H " + (j + 1));
                            break;
                        case 2:
                            System.out.println("C " + (j + 1));
                            break;
                        case 3:
                            System.out.println("D " + (j + 1));
                            break;
                    }
                }
            } {
                if (cards[i][j] == false) {
                    switch (i) {
                        case 0:
                            System.out.println("S " + (j + 1));
                            break;
                        case 1:
                            System.out.println("H " + (j + 1));
                            break;
                        case 2:
                            System.out.println("C " + (j + 1));
                            break;
                        case 3:
                            System.out.println("D " + (j + 1));
                            break;
                    }
                }
            } if (cards[i][j] == false) {
                    switch (i) {
                        case 0:
                            System.out.println("S " + (j + 1));
                            break;
                        case 1:
                            System.out.println("H " + (j + 1));
                            break;
                        case 2:
                            System.out.println("C " + (j + 1));
                            break;
                        case 3:
                            System.out.println("D " + (j + 1));
                            break;
                    }
                } cards[i][j] == false cards[i][j] cards[i] cards i j false {
                    switch (i) {
                        case 0:
                            System.out.println("S " + (j + 1));
                            break;
                        case 1:
                            System.out.println("H " + (j + 1));
                            break;
                        case 2:
                            System.out.println("C " + (j + 1));
                            break;
                        case 3:
                            System.out.println("D " + (j + 1));
                            break;
                    }
                } switch (i) {
                        case 0:
                            System.out.println("S " + (j + 1));
                            break;
                        case 1:
                            System.out.println("H " + (j + 1));
                            break;
                        case 2:
                            System.out.println("C " + (j + 1));
                            break;
                        case 3:
                            System.out.println("D " + (j + 1));
                            break;
                    } i case 0: 0 case 0: System.out.println("S " + (j + 1)) System.out.println System.out System System.out "S " + (j + 1) "S " (j + 1) j 1 break; case 1: 1 case 1: System.out.println("H " + (j + 1)) System.out.println System.out System System.out "H " + (j + 1) "H " (j + 1) j 1 break; case 2: 2 case 2: System.out.println("C " + (j + 1)) System.out.println System.out System System.out "C " + (j + 1) "C " (j + 1) j 1 break; case 3: 3 case 3: System.out.println("D " + (j + 1)) System.out.println System.out System System.out "D " + (j + 1) "D " (j + 1) j 1 break; String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        boolean[][] cards = new boolean[4][13];
        int n = scan.nextInt();

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

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

} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        boolean[][] cards = new boolean[4][13];
        int n = scan.nextInt();

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

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

} Main
import java.util.Scanner;

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

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

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

}