import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

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

        int n = sc.nextInt();
        String tl[][] = new String[n][2];

        ArrayList<Integer> slist = new ArrayList<>();
        ArrayList<Integer> hlist = new ArrayList<>();
        ArrayList<Integer> clist = new ArrayList<>();
        ArrayList<Integer> dlist = new ArrayList<>();

        if (n <= 52) {
            for (int i = 0; i < n; i++) {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            }

            for (int i = 0; i < n; i++) {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            }
            Collections.sort(slist);
            Collections.sort(hlist);
            Collections.sort(clist);
            Collections.sort(dlist);
            
        }
        
        for (int k=1; k<=13; k++) {
            if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } 
        }
    }
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {

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

        int n = sc.nextInt();
        String tl[][] = new String[n][2];

        ArrayList<Integer> slist = new ArrayList<>();
        ArrayList<Integer> hlist = new ArrayList<>();
        ArrayList<Integer> clist = new ArrayList<>();
        ArrayList<Integer> dlist = new ArrayList<>();

        if (n <= 52) {
            for (int i = 0; i < n; i++) {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            }

            for (int i = 0; i < n; i++) {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            }
            Collections.sort(slist);
            Collections.sort(hlist);
            Collections.sort(clist);
            Collections.sort(dlist);
            
        }
        
        for (int k=1; k<=13; k++) {
            if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } 
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String tl[][] = new String[n][2];

        ArrayList<Integer> slist = new ArrayList<>();
        ArrayList<Integer> hlist = new ArrayList<>();
        ArrayList<Integer> clist = new ArrayList<>();
        ArrayList<Integer> dlist = new ArrayList<>();

        if (n <= 52) {
            for (int i = 0; i < n; i++) {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            }

            for (int i = 0; i < n; i++) {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            }
            Collections.sort(slist);
            Collections.sort(hlist);
            Collections.sort(clist);
            Collections.sort(dlist);
            
        }
        
        for (int k=1; k<=13; k++) {
            if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } 
        }
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        String tl[][] = new String[n][2];

        ArrayList<Integer> slist = new ArrayList<>();
        ArrayList<Integer> hlist = new ArrayList<>();
        ArrayList<Integer> clist = new ArrayList<>();
        ArrayList<Integer> dlist = new ArrayList<>();

        if (n <= 52) {
            for (int i = 0; i < n; i++) {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            }

            for (int i = 0; i < n; i++) {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            }
            Collections.sort(slist);
            Collections.sort(hlist);
            Collections.sort(clist);
            Collections.sort(dlist);
            
        }
        
        for (int k=1; k<=13; k++) {
            if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } 
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc String tl[][] = new String[n][2]; tl new String[n][2] n 2 ArrayList<Integer> slist = new ArrayList<>(); slist new ArrayList<>() ArrayList<Integer> hlist = new ArrayList<>(); hlist new ArrayList<>() ArrayList<Integer> clist = new ArrayList<>(); clist new ArrayList<>() ArrayList<Integer> dlist = new ArrayList<>(); dlist new ArrayList<>() if (n <= 52) {
            for (int i = 0; i < n; i++) {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            }

            for (int i = 0; i < n; i++) {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            }
            Collections.sort(slist);
            Collections.sort(hlist);
            Collections.sort(clist);
            Collections.sort(dlist);
            
        } n <= 52 n 52 {
            for (int i = 0; i < n; i++) {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            }

            for (int i = 0; i < n; i++) {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            }
            Collections.sort(slist);
            Collections.sort(hlist);
            Collections.sort(clist);
            Collections.sort(dlist);
            
        } for (int i = 0; i < n; i++) {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            } {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            } tl[i][0] = sc.next() tl[i][0] tl[i] tl i 0 sc.next() sc.next sc tl[i][1] = sc.next() tl[i][1] tl[i] tl i 1 sc.next() sc.next sc for (int i = 0; i < n; i++) {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            } {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            } if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                } "S".equals(tl[i][0]) "S".equals "S" tl[i][0] tl[i] tl i 0 {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    } int j = 1; int j = 1; j 1 j <= 13 j 13 j++ j++ j {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    } {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    } if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        } tl[i][1].equals(String.valueOf(j)) tl[i][1].equals tl[i][1] tl[i] tl i 1 String.valueOf(j) String.valueOf String j {
                            slist.add(j);
                        } slist.add(j) slist.add slist j if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                } "H".equals(tl[i][0]) "H".equals "H" tl[i][0] tl[i] tl i 0 {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    } int j = 1; int j = 1; j 1 j <= 13 j 13 j++ j++ j {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    } {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    } if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        } tl[i][1].equals(String.valueOf(j)) tl[i][1].equals tl[i][1] tl[i] tl i 1 String.valueOf(j) String.valueOf String j {
                            hlist.add(j);
                        } hlist.add(j) hlist.add hlist j if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                } "C".equals(tl[i][0]) "C".equals "C" tl[i][0] tl[i] tl i 0 {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    } int j = 1; int j = 1; j 1 j <= 13 j 13 j++ j++ j {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    } {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    } if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        } tl[i][1].equals(String.valueOf(j)) tl[i][1].equals tl[i][1] tl[i] tl i 1 String.valueOf(j) String.valueOf String j {
                            clist.add(j);
                        } clist.add(j) clist.add clist j if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                } "D".equals(tl[i][0]) "D".equals "D" tl[i][0] tl[i] tl i 0 {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                } for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    } int j = 1; int j = 1; j 1 j <= 13 j 13 j++ j++ j {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    } {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    } if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        } tl[i][1].equals(String.valueOf(j)) tl[i][1].equals tl[i][1] tl[i] tl i 1 String.valueOf(j) String.valueOf String j {
                            dlist.add(j);
                        } dlist.add(j) dlist.add dlist j Collections.sort(slist) Collections.sort Collections slist Collections.sort(hlist) Collections.sort Collections hlist Collections.sort(clist) Collections.sort Collections clist Collections.sort(dlist) Collections.sort Collections dlist for (int k=1; k<=13; k++) {
            if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } 
        } int k=1; int k=1; k 1 k<=13 k 13 k++ k++ k {
            if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } 
        } {
            if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } 
        } if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } slist.indexOf(k) == -1 slist.indexOf(k) slist.indexOf slist k -1 1 {
                System.out.println("S "+k);
            } System.out.println("S "+k) System.out.println System.out System System.out "S "+k "S " k for (int k=1; k<=13; k++) {
            if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } 
        } int k=1; int k=1; k 1 k<=13 k 13 k++ k++ k {
            if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } 
        } {
            if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } 
        } if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } hlist.indexOf(k) == -1 hlist.indexOf(k) hlist.indexOf hlist k -1 1 {
                System.out.println("H "+k);
            } System.out.println("H "+k) System.out.println System.out System System.out "H "+k "H " k for (int k=1; k<=13; k++) {
            if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } 
        } int k=1; int k=1; k 1 k<=13 k 13 k++ k++ k {
            if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } 
        } {
            if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } 
        } if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } clist.indexOf(k) == -1 clist.indexOf(k) clist.indexOf clist k -1 1 {
                System.out.println("C "+k);
            } System.out.println("C "+k) System.out.println System.out System System.out "C "+k "C " k for (int k=1; k<=13; k++) {
            if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } 
        } int k=1; int k=1; k 1 k<=13 k 13 k++ k++ k {
            if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } 
        } {
            if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } 
        } if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } dlist.indexOf(k) == -1 dlist.indexOf(k) dlist.indexOf dlist k -1 1 {
                System.out.println("D "+k);
            } System.out.println("D "+k) System.out.println System.out System System.out "D "+k "D " k String[] args args public class Main {

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

        int n = sc.nextInt();
        String tl[][] = new String[n][2];

        ArrayList<Integer> slist = new ArrayList<>();
        ArrayList<Integer> hlist = new ArrayList<>();
        ArrayList<Integer> clist = new ArrayList<>();
        ArrayList<Integer> dlist = new ArrayList<>();

        if (n <= 52) {
            for (int i = 0; i < n; i++) {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            }

            for (int i = 0; i < n; i++) {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            }
            Collections.sort(slist);
            Collections.sort(hlist);
            Collections.sort(clist);
            Collections.sort(dlist);
            
        }
        
        for (int k=1; k<=13; k++) {
            if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } 
        }
    }
} public class Main {

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

        int n = sc.nextInt();
        String tl[][] = new String[n][2];

        ArrayList<Integer> slist = new ArrayList<>();
        ArrayList<Integer> hlist = new ArrayList<>();
        ArrayList<Integer> clist = new ArrayList<>();
        ArrayList<Integer> dlist = new ArrayList<>();

        if (n <= 52) {
            for (int i = 0; i < n; i++) {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            }

            for (int i = 0; i < n; i++) {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            }
            Collections.sort(slist);
            Collections.sort(hlist);
            Collections.sort(clist);
            Collections.sort(dlist);
            
        }
        
        for (int k=1; k<=13; k++) {
            if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } 
        }
    }
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

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

        int n = sc.nextInt();
        String tl[][] = new String[n][2];

        ArrayList<Integer> slist = new ArrayList<>();
        ArrayList<Integer> hlist = new ArrayList<>();
        ArrayList<Integer> clist = new ArrayList<>();
        ArrayList<Integer> dlist = new ArrayList<>();

        if (n <= 52) {
            for (int i = 0; i < n; i++) {
                tl[i][0] = sc.next();
                tl[i][1] = sc.next();
            }

            for (int i = 0; i < n; i++) {
                if ("S".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            slist.add(j);
                        }
                    }
                } else if ("H".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            hlist.add(j);
                        }
                    }
                } else if ("C".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            clist.add(j);
                        }
                    }
                } else if ("D".equals(tl[i][0])) {
                    for (int j = 1; j <= 13; j++) {
                        if (tl[i][1].equals(String.valueOf(j))) {
                            dlist.add(j);
                        }
                    }
                }
            }
            Collections.sort(slist);
            Collections.sort(hlist);
            Collections.sort(clist);
            Collections.sort(dlist);
            
        }
        
        for (int k=1; k<=13; k++) {
            if (slist.indexOf(k) == -1) {
                System.out.println("S "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (hlist.indexOf(k) == -1) {
                System.out.println("H "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (clist.indexOf(k) == -1) {
                System.out.println("C "+k);
            } 
        }
        for (int k=1; k<=13; k++) {
            if (dlist.indexOf(k) == -1) {
                System.out.println("D "+k);
            } 
        }
    }
}