import java.util.*;

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

        boolean[][] deck = new boolean[4][13];

        Arrays.fill(deck[0], false);
        Arrays.fill(deck[1], false);
        Arrays.fill(deck[2], false);
        Arrays.fill(deck[3], false);

        int n = sc.nextInt();
        while (n-- > 0) {
            switch (sc.next().charAt(0)) {
            case 'S': deck[0][sc.nextInt()-1] = true; break;
            case 'H': deck[1][sc.nextInt()-1] = true; break;
            case 'C': deck[2][sc.nextInt()-1] = true; break;
            case 'D': deck[3][sc.nextInt()-1] = true; break;
            }
        }

        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 13; j++) {
                if (deck[i][j] == false) {
                    System.out.print("SHCD".charAt(i));
                    System.out.print(' ');
                    System.out.println(j+1);
                }
            }
        }
    }
}
 import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        boolean[][] deck = new boolean[4][13];

        Arrays.fill(deck[0], false);
        Arrays.fill(deck[1], false);
        Arrays.fill(deck[2], false);
        Arrays.fill(deck[3], false);

        int n = sc.nextInt();
        while (n-- > 0) {
            switch (sc.next().charAt(0)) {
            case 'S': deck[0][sc.nextInt()-1] = true; break;
            case 'H': deck[1][sc.nextInt()-1] = true; break;
            case 'C': deck[2][sc.nextInt()-1] = true; break;
            case 'D': deck[3][sc.nextInt()-1] = true; break;
            }
        }

        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 13; j++) {
                if (deck[i][j] == false) {
                    System.out.print("SHCD".charAt(i));
                    System.out.print(' ');
                    System.out.println(j+1);
                }
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        boolean[][] deck = new boolean[4][13];

        Arrays.fill(deck[0], false);
        Arrays.fill(deck[1], false);
        Arrays.fill(deck[2], false);
        Arrays.fill(deck[3], false);

        int n = sc.nextInt();
        while (n-- > 0) {
            switch (sc.next().charAt(0)) {
            case 'S': deck[0][sc.nextInt()-1] = true; break;
            case 'H': deck[1][sc.nextInt()-1] = true; break;
            case 'C': deck[2][sc.nextInt()-1] = true; break;
            case 'D': deck[3][sc.nextInt()-1] = true; break;
            }
        }

        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 13; j++) {
                if (deck[i][j] == false) {
                    System.out.print("SHCD".charAt(i));
                    System.out.print(' ');
                    System.out.println(j+1);
                }
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);

        boolean[][] deck = new boolean[4][13];

        Arrays.fill(deck[0], false);
        Arrays.fill(deck[1], false);
        Arrays.fill(deck[2], false);
        Arrays.fill(deck[3], false);

        int n = sc.nextInt();
        while (n-- > 0) {
            switch (sc.next().charAt(0)) {
            case 'S': deck[0][sc.nextInt()-1] = true; break;
            case 'H': deck[1][sc.nextInt()-1] = true; break;
            case 'C': deck[2][sc.nextInt()-1] = true; break;
            case 'D': deck[3][sc.nextInt()-1] = true; break;
            }
        }

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

        boolean[][] deck = new boolean[4][13];

        Arrays.fill(deck[0], false);
        Arrays.fill(deck[1], false);
        Arrays.fill(deck[2], false);
        Arrays.fill(deck[3], false);

        int n = sc.nextInt();
        while (n-- > 0) {
            switch (sc.next().charAt(0)) {
            case 'S': deck[0][sc.nextInt()-1] = true; break;
            case 'H': deck[1][sc.nextInt()-1] = true; break;
            case 'C': deck[2][sc.nextInt()-1] = true; break;
            case 'D': deck[3][sc.nextInt()-1] = true; break;
            }
        }

        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 13; j++) {
                if (deck[i][j] == false) {
                    System.out.print("SHCD".charAt(i));
                    System.out.print(' ');
                    System.out.println(j+1);
                }
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        boolean[][] deck = new boolean[4][13];

        Arrays.fill(deck[0], false);
        Arrays.fill(deck[1], false);
        Arrays.fill(deck[2], false);
        Arrays.fill(deck[3], false);

        int n = sc.nextInt();
        while (n-- > 0) {
            switch (sc.next().charAt(0)) {
            case 'S': deck[0][sc.nextInt()-1] = true; break;
            case 'H': deck[1][sc.nextInt()-1] = true; break;
            case 'C': deck[2][sc.nextInt()-1] = true; break;
            case 'D': deck[3][sc.nextInt()-1] = true; break;
            }
        }

        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 13; j++) {
                if (deck[i][j] == false) {
                    System.out.print("SHCD".charAt(i));
                    System.out.print(' ');
                    System.out.println(j+1);
                }
            }
        }
    }
} Main
import java.util.*;

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

        boolean[][] deck = new boolean[4][13];

        Arrays.fill(deck[0], false);
        Arrays.fill(deck[1], false);
        Arrays.fill(deck[2], false);
        Arrays.fill(deck[3], false);

        int n = sc.nextInt();
        while (n-- > 0) {
            switch (sc.next().charAt(0)) {
            case 'S': deck[0][sc.nextInt()-1] = true; break;
            case 'H': deck[1][sc.nextInt()-1] = true; break;
            case 'C': deck[2][sc.nextInt()-1] = true; break;
            case 'D': deck[3][sc.nextInt()-1] = true; break;
            }
        }

        for (int i = 0; i < 4; i++) {
            for (int j = 0; j < 13; j++) {
                if (deck[i][j] == false) {
                    System.out.print("SHCD".charAt(i));
                    System.out.print(' ');
                    System.out.println(j+1);
                }
            }
        }
    }
}

