import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        String token;
        int rank;
        boolean[] S = new boolean[13];
        boolean[] H = new boolean[13];
        boolean[] C = new boolean[13];
        boolean[] D = new boolean[13];

        for (int i = 0; i < 13; i++) {
            S[i] = H[i] = C[i] = D[i] = false;
        }

        for (int i = 0; i < n; i++) {
            token = scan.next();
            switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            }
        }

        for (int i = 0; i < 13; i++) {
            if (!S[i]) System.out.println("S " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!H[i]) System.out.println("H " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!C[i]) System.out.println("C " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!D[i]) System.out.println("D " + (i + 1));
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        String token;
        int rank;
        boolean[] S = new boolean[13];
        boolean[] H = new boolean[13];
        boolean[] C = new boolean[13];
        boolean[] D = new boolean[13];

        for (int i = 0; i < 13; i++) {
            S[i] = H[i] = C[i] = D[i] = false;
        }

        for (int i = 0; i < n; i++) {
            token = scan.next();
            switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            }
        }

        for (int i = 0; i < 13; i++) {
            if (!S[i]) System.out.println("S " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!H[i]) System.out.println("H " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!C[i]) System.out.println("C " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!D[i]) System.out.println("D " + (i + 1));
        }
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        String token;
        int rank;
        boolean[] S = new boolean[13];
        boolean[] H = new boolean[13];
        boolean[] C = new boolean[13];
        boolean[] D = new boolean[13];

        for (int i = 0; i < 13; i++) {
            S[i] = H[i] = C[i] = D[i] = false;
        }

        for (int i = 0; i < n; i++) {
            token = scan.next();
            switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            }
        }

        for (int i = 0; i < 13; i++) {
            if (!S[i]) System.out.println("S " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!H[i]) System.out.println("H " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!C[i]) System.out.println("C " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!D[i]) System.out.println("D " + (i + 1));
        }
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        String token;
        int rank;
        boolean[] S = new boolean[13];
        boolean[] H = new boolean[13];
        boolean[] C = new boolean[13];
        boolean[] D = new boolean[13];

        for (int i = 0; i < 13; i++) {
            S[i] = H[i] = C[i] = D[i] = false;
        }

        for (int i = 0; i < n; i++) {
            token = scan.next();
            switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            }
        }

        for (int i = 0; i < 13; i++) {
            if (!S[i]) System.out.println("S " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!H[i]) System.out.println("H " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!C[i]) System.out.println("C " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!D[i]) System.out.println("D " + (i + 1));
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan String token; token int rank; rank boolean[] S = new boolean[13]; S new boolean[13] 13 boolean[] H = new boolean[13]; H new boolean[13] 13 boolean[] C = new boolean[13]; C new boolean[13] 13 boolean[] D = new boolean[13]; D new boolean[13] 13 for (int i = 0; i < 13; i++) {
            S[i] = H[i] = C[i] = D[i] = false;
        } int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
            S[i] = H[i] = C[i] = D[i] = false;
        } {
            S[i] = H[i] = C[i] = D[i] = false;
        } S[i] = H[i] = C[i] = D[i] = false S[i] S i H[i] = C[i] = D[i] = false H[i] H i C[i] = D[i] = false C[i] C i D[i] = false D[i] D i false for (int i = 0; i < n; i++) {
            token = scan.next();
            switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            token = scan.next();
            switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            }
        } {
            token = scan.next();
            switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            }
        } token = scan.next() token scan.next() scan.next scan switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            } token case "S": "S" case "S": rank = scan.nextInt() rank scan.nextInt() scan.nextInt scan S[rank -1] = true S[rank -1] S rank -1 rank 1 true break; case "H": "H" case "H": rank = scan.nextInt() rank scan.nextInt() scan.nextInt scan H[rank -1] = true H[rank -1] H rank -1 rank 1 true break; case "C": "C" case "C": rank = scan.nextInt() rank scan.nextInt() scan.nextInt scan C[rank -1] = true C[rank -1] C rank -1 rank 1 true break; case "D": "D" case "D": rank = scan.nextInt() rank scan.nextInt() scan.nextInt scan D[rank -1] = true D[rank -1] D rank -1 rank 1 true break; for (int i = 0; i < 13; i++) {
            if (!S[i]) System.out.println("S " + (i + 1));
        } int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
            if (!S[i]) System.out.println("S " + (i + 1));
        } {
            if (!S[i]) System.out.println("S " + (i + 1));
        } if (!S[i]) System.out.println("S " + (i + 1)); !S[i] S[i] S i System.out.println("S " + (i + 1)) System.out.println System.out System System.out "S " + (i + 1) "S " (i + 1) i 1 for (int i = 0; i < 13; i++) {
            if (!H[i]) System.out.println("H " + (i + 1));
        } int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
            if (!H[i]) System.out.println("H " + (i + 1));
        } {
            if (!H[i]) System.out.println("H " + (i + 1));
        } if (!H[i]) System.out.println("H " + (i + 1)); !H[i] H[i] H i System.out.println("H " + (i + 1)) System.out.println System.out System System.out "H " + (i + 1) "H " (i + 1) i 1 for (int i = 0; i < 13; i++) {
            if (!C[i]) System.out.println("C " + (i + 1));
        } int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
            if (!C[i]) System.out.println("C " + (i + 1));
        } {
            if (!C[i]) System.out.println("C " + (i + 1));
        } if (!C[i]) System.out.println("C " + (i + 1)); !C[i] C[i] C i System.out.println("C " + (i + 1)) System.out.println System.out System System.out "C " + (i + 1) "C " (i + 1) i 1 for (int i = 0; i < 13; i++) {
            if (!D[i]) System.out.println("D " + (i + 1));
        } int i = 0; int i = 0; i 0 i < 13 i 13 i++ i++ i {
            if (!D[i]) System.out.println("D " + (i + 1));
        } {
            if (!D[i]) System.out.println("D " + (i + 1));
        } if (!D[i]) System.out.println("D " + (i + 1)); !D[i] D[i] D i System.out.println("D " + (i + 1)) System.out.println System.out System System.out "D " + (i + 1) "D " (i + 1) i 1 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        String token;
        int rank;
        boolean[] S = new boolean[13];
        boolean[] H = new boolean[13];
        boolean[] C = new boolean[13];
        boolean[] D = new boolean[13];

        for (int i = 0; i < 13; i++) {
            S[i] = H[i] = C[i] = D[i] = false;
        }

        for (int i = 0; i < n; i++) {
            token = scan.next();
            switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            }
        }

        for (int i = 0; i < 13; i++) {
            if (!S[i]) System.out.println("S " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!H[i]) System.out.println("H " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!C[i]) System.out.println("C " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!D[i]) System.out.println("D " + (i + 1));
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        String token;
        int rank;
        boolean[] S = new boolean[13];
        boolean[] H = new boolean[13];
        boolean[] C = new boolean[13];
        boolean[] D = new boolean[13];

        for (int i = 0; i < 13; i++) {
            S[i] = H[i] = C[i] = D[i] = false;
        }

        for (int i = 0; i < n; i++) {
            token = scan.next();
            switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            }
        }

        for (int i = 0; i < 13; i++) {
            if (!S[i]) System.out.println("S " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!H[i]) System.out.println("H " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!C[i]) System.out.println("C " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!D[i]) System.out.println("D " + (i + 1));
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        String token;
        int rank;
        boolean[] S = new boolean[13];
        boolean[] H = new boolean[13];
        boolean[] C = new boolean[13];
        boolean[] D = new boolean[13];

        for (int i = 0; i < 13; i++) {
            S[i] = H[i] = C[i] = D[i] = false;
        }

        for (int i = 0; i < n; i++) {
            token = scan.next();
            switch (token) {
                case "S":
                    rank = scan.nextInt();
                    S[rank -1] = true;
                    break;
                case "H":
                    rank = scan.nextInt();
                    H[rank -1] = true;
                    break;
                case "C":
                    rank = scan.nextInt();
                    C[rank -1] = true;
                    break;
                case "D":
                    rank = scan.nextInt();
                    D[rank -1] = true;
                    break;
            }
        }

        for (int i = 0; i < 13; i++) {
            if (!S[i]) System.out.println("S " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!H[i]) System.out.println("H " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!C[i]) System.out.println("C " + (i + 1));
        }
        for (int i = 0; i < 13; i++) {
            if (!D[i]) System.out.println("D " + (i + 1));
        }
    }
}