import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        boolean[][] hasCards = new boolean[4][13];
        String card;
        for (int i = 0; i < n; i++) {
            card = in.next();
            int cardMark = 0;
            if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            }
            int cardNumber = in.nextInt() -1;

            hasCards[cardMark][cardNumber] = true;
        }

        in.close();

        for (int x = 0; x < 4; x++) {
            for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            }
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        boolean[][] hasCards = new boolean[4][13];
        String card;
        for (int i = 0; i < n; i++) {
            card = in.next();
            int cardMark = 0;
            if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            }
            int cardNumber = in.nextInt() -1;

            hasCards[cardMark][cardNumber] = true;
        }

        in.close();

        for (int x = 0; x < 4; x++) {
            for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            }
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        boolean[][] hasCards = new boolean[4][13];
        String card;
        for (int i = 0; i < n; i++) {
            card = in.next();
            int cardMark = 0;
            if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            }
            int cardNumber = in.nextInt() -1;

            hasCards[cardMark][cardNumber] = true;
        }

        in.close();

        for (int x = 0; x < 4; x++) {
            for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            }
        }
    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        boolean[][] hasCards = new boolean[4][13];
        String card;
        for (int i = 0; i < n; i++) {
            card = in.next();
            int cardMark = 0;
            if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            }
            int cardNumber = in.nextInt() -1;

            hasCards[cardMark][cardNumber] = true;
        }

        in.close();

        for (int x = 0; x < 4; x++) {
            for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            }
        }
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in boolean[][] hasCards = new boolean[4][13]; hasCards new boolean[4][13] 4 13 String card; card for (int i = 0; i < n; i++) {
            card = in.next();
            int cardMark = 0;
            if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            }
            int cardNumber = in.nextInt() -1;

            hasCards[cardMark][cardNumber] = true;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            card = in.next();
            int cardMark = 0;
            if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            }
            int cardNumber = in.nextInt() -1;

            hasCards[cardMark][cardNumber] = true;
        } {
            card = in.next();
            int cardMark = 0;
            if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            }
            int cardNumber = in.nextInt() -1;

            hasCards[cardMark][cardNumber] = true;
        } card = in.next() card in.next() in.next in int cardMark = 0; cardMark 0 if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            } card.equals("S") card.equals card "S" {
                cardMark = 0;
            } cardMark = 0 cardMark 0 if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            } card.equals("H") card.equals card "H" {
                cardMark = 1;
            } cardMark = 1 cardMark 1 if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            } card.equals("C") card.equals card "C" {
                cardMark = 2;
            } cardMark = 2 cardMark 2 if(card.equals("D")){
                cardMark = 3;
            } card.equals("D") card.equals card "D" {
                cardMark = 3;
            } cardMark = 3 cardMark 3 int cardNumber = in.nextInt() -1; cardNumber in.nextInt() -1 in.nextInt() in.nextInt in 1 hasCards[cardMark][cardNumber] = true hasCards[cardMark][cardNumber] hasCards[cardMark] hasCards cardMark cardNumber true in.close() in.close in for (int x = 0; x < 4; x++) {
            for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            }
        } int x = 0; int x = 0; x 0 x < 4 x 4 x++ x++ x {
            for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            }
        } {
            for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            }
        } for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            } int y = 0; int y = 0; y 0 y < 13 y 13 y++ y++ y {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            } {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            } if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                } hasCards[x][y] == false hasCards[x][y] hasCards[x] hasCards x y false {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                } switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    } x case 0: 0 case 0: System.out.print("S") System.out.print System.out System System.out "S" break; case 1: 1 case 1: System.out.print("H") System.out.print System.out System System.out "H" break; case 2: 2 case 2: System.out.print("C") System.out.print System.out System System.out "C" break; case 3: 3 case 3: System.out.print("D") System.out.print System.out System System.out "D" break; default: default: break; System.out.print(" ") System.out.print System.out System System.out " " System.out.println(y + 1) System.out.println System.out System System.out y + 1 y 1 String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        boolean[][] hasCards = new boolean[4][13];
        String card;
        for (int i = 0; i < n; i++) {
            card = in.next();
            int cardMark = 0;
            if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            }
            int cardNumber = in.nextInt() -1;

            hasCards[cardMark][cardNumber] = true;
        }

        in.close();

        for (int x = 0; x < 4; x++) {
            for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            }
        }
    }
} public class Main {

    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        boolean[][] hasCards = new boolean[4][13];
        String card;
        for (int i = 0; i < n; i++) {
            card = in.next();
            int cardMark = 0;
            if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            }
            int cardNumber = in.nextInt() -1;

            hasCards[cardMark][cardNumber] = true;
        }

        in.close();

        for (int x = 0; x < 4; x++) {
            for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            }
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();

        boolean[][] hasCards = new boolean[4][13];
        String card;
        for (int i = 0; i < n; i++) {
            card = in.next();
            int cardMark = 0;
            if (card.equals("S")){
                cardMark = 0;
            }else if(card.equals("H")){
                cardMark = 1;
            }else if(card.equals("C")){
                cardMark = 2;
            }else if(card.equals("D")){
                cardMark = 3;
            }
            int cardNumber = in.nextInt() -1;

            hasCards[cardMark][cardNumber] = true;
        }

        in.close();

        for (int x = 0; x < 4; x++) {
            for (int y = 0; y < 13; y++) {
                if (hasCards[x][y] == false) {
                    switch (x) {
                        case 0:
                            System.out.print("S");
                            break;

                        case 1:
                            System.out.print("H");
                            break;

                        case 2:
                            System.out.print("C");
                            break;

                        case 3:
                            System.out.print("D");
                            break;

                        default:
                            break;
                    }
                    System.out.print(" ");
                    System.out.println(y + 1);
                }
            }
        }
    }
}