import java.util.Scanner;

/**
 * Finding Missing Cards
 */
public class Main {
    private static Scanner scan;

    public static void main(String[] args) {
        scan = new Scanner(System.in);

        int n = scan.nextInt();
        // 絵柄:スペード、ハート、クラブ、ダイヤ
        // ランク:1-13
        int[][] card = new int[4][13];
        String mark = "";
        int lank = 0;
        for (int i = 0; i < n; i++) {
            mark = scan.next();
            lank = scan.nextInt();
            lank --;
            if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            }
        }
        for (int i = 0; i < 4; i++) {
            for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            }
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    private static Scanner scan;

    public static void main(String[] args) {
        scan = new Scanner(System.in);

        int n = scan.nextInt();
        // 絵柄:スペード、ハート、クラブ、ダイヤ
        // ランク:1-13
        int[][] card = new int[4][13];
        String mark = "";
        int lank = 0;
        for (int i = 0; i < n; i++) {
            mark = scan.next();
            lank = scan.nextInt();
            lank --;
            if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            }
        }
        for (int i = 0; i < 4; i++) {
            for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            }
        }
    }
} Main private static Scanner scan; scan public static void main(String[] args) {
        scan = new Scanner(System.in);

        int n = scan.nextInt();
        // 絵柄:スペード、ハート、クラブ、ダイヤ
        // ランク:1-13
        int[][] card = new int[4][13];
        String mark = "";
        int lank = 0;
        for (int i = 0; i < n; i++) {
            mark = scan.next();
            lank = scan.nextInt();
            lank --;
            if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            }
        }
        for (int i = 0; i < 4; i++) {
            for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            }
        }
    } main {
        scan = new Scanner(System.in);

        int n = scan.nextInt();
        // 絵柄:スペード、ハート、クラブ、ダイヤ
        // ランク:1-13
        int[][] card = new int[4][13];
        String mark = "";
        int lank = 0;
        for (int i = 0; i < n; i++) {
            mark = scan.next();
            lank = scan.nextInt();
            lank --;
            if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            }
        }
        for (int i = 0; i < 4; i++) {
            for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            }
        }
    } scan = new Scanner(System.in) scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int[][] card = new int[4][13]; card new int[4][13] 4 13 String mark = ""; mark "" int lank = 0; lank 0 for (int i = 0; i < n; i++) {
            mark = scan.next();
            lank = scan.nextInt();
            lank --;
            if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            mark = scan.next();
            lank = scan.nextInt();
            lank --;
            if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            }
        } {
            mark = scan.next();
            lank = scan.nextInt();
            lank --;
            if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            }
        } mark = scan.next() mark scan.next() scan.next scan lank = scan.nextInt() lank scan.nextInt() scan.nextInt scan lank -- lank if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            } mark.equals("S") mark.equals mark "S" {
                card[0][lank] = 1;
            } card[0][lank] = 1 card[0][lank] card[0] card 0 lank 1 if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            } mark.equals("H") mark.equals mark "H" {
                card[1][lank] = 1;
            } card[1][lank] = 1 card[1][lank] card[1] card 1 lank 1 if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            } mark.equals("C") mark.equals mark "C" {
                card[2][lank] = 1;
            } card[2][lank] = 1 card[2][lank] card[2] card 2 lank 1 if (mark.equals("D")) {
                card[3][lank] = 1;
            } mark.equals("D") mark.equals mark "D" {
                card[3][lank] = 1;
            } card[3][lank] = 1 card[3][lank] card[3] card 3 lank 1 for (int i = 0; i < 4; i++) {
            for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            }
        } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
            for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            }
        } {
            for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            }
        } for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            } int p = 0; int p = 0; p 0 p < 13 p 13 p++ p++ p {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            } {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            } if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                } card[i][p] == 0 card[i][p] card[i] card i p 0 {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                } if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    } i == 0 i 0 {
                        mark = "S";
                    } mark = "S" mark "S" if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    } i == 1 i 1 {
                        mark = "H";
                    } mark = "H" mark "H" if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    } i == 2 i 2 {
                        mark = "C";
                    } mark = "C" mark "C" if (i == 3) {
                        mark = "D";
                    } i == 3 i 3 {
                        mark = "D";
                    } mark = "D" mark "D" lank = p + 1 lank p + 1 p 1 System.out.println(mark + " " + lank) System.out.println System.out System System.out mark + " " + lank mark + " " + lank mark " " lank String[] args args public class Main {
    private static Scanner scan;

    public static void main(String[] args) {
        scan = new Scanner(System.in);

        int n = scan.nextInt();
        // 絵柄:スペード、ハート、クラブ、ダイヤ
        // ランク:1-13
        int[][] card = new int[4][13];
        String mark = "";
        int lank = 0;
        for (int i = 0; i < n; i++) {
            mark = scan.next();
            lank = scan.nextInt();
            lank --;
            if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            }
        }
        for (int i = 0; i < 4; i++) {
            for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            }
        }
    }
} public class Main {
    private static Scanner scan;

    public static void main(String[] args) {
        scan = new Scanner(System.in);

        int n = scan.nextInt();
        // 絵柄:スペード、ハート、クラブ、ダイヤ
        // ランク:1-13
        int[][] card = new int[4][13];
        String mark = "";
        int lank = 0;
        for (int i = 0; i < n; i++) {
            mark = scan.next();
            lank = scan.nextInt();
            lank --;
            if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            }
        }
        for (int i = 0; i < 4; i++) {
            for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            }
        }
    }
} Main
import java.util.Scanner;

/**
 * Finding Missing Cards
 */
public class Main {
    private static Scanner scan;

    public static void main(String[] args) {
        scan = new Scanner(System.in);

        int n = scan.nextInt();
        // 絵柄:スペード、ハート、クラブ、ダイヤ
        // ランク:1-13
        int[][] card = new int[4][13];
        String mark = "";
        int lank = 0;
        for (int i = 0; i < n; i++) {
            mark = scan.next();
            lank = scan.nextInt();
            lank --;
            if (mark.equals("S")) {
                card[0][lank] = 1;
            } else if (mark.equals("H")) {
                card[1][lank] = 1;
            } else if (mark.equals("C")) {
                card[2][lank] = 1;
            } else if (mark.equals("D")) {
                card[3][lank] = 1;
            }
        }
        for (int i = 0; i < 4; i++) {
            for (int p = 0; p < 13; p++) {
                if (card[i][p] == 0) {
                    if (i == 0) {
                        mark = "S";
                    } else if (i == 1) {
                        mark = "H";
                    } else if (i == 2) {
                        mark = "C";
                    } else if (i == 3) {
                        mark = "D";
                    }
                    lank = p + 1;
                    System.out.println(mark + " " + lank);
                }
            }
        }
    }
}