import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int[][] ary = new int[4][13];
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            String s = scn.next();
            int p, v = scn.nextInt();
            if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            }
            ary[p][~-v]++;
        }
        for(int i = 0; i < 52; i++) {
            if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int[][] ary = new int[4][13];
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            String s = scn.next();
            int p, v = scn.nextInt();
            if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            }
            ary[p][~-v]++;
        }
        for(int i = 0; i < 52; i++) {
            if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int[][] ary = new int[4][13];
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            String s = scn.next();
            int p, v = scn.nextInt();
            if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            }
            ary[p][~-v]++;
        }
        for(int i = 0; i < 52; i++) {
            if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            }
        }
    } main {
        Scanner scn = new Scanner(System.in);
        int[][] ary = new int[4][13];
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            String s = scn.next();
            int p, v = scn.nextInt();
            if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            }
            ary[p][~-v]++;
        }
        for(int i = 0; i < 52; i++) {
            if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            }
        }
    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) int[][] ary = new int[4][13]; ary new int[4][13] 4 13 for(int i = 0, n = scn.nextInt(); i < n; i++) {
            String s = scn.next();
            int p, v = scn.nextInt();
            if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            }
            ary[p][~-v]++;
        } int i = 0, n = scn.nextInt(); int i = 0 i 0 n = scn.nextInt(); n scn.nextInt() scn.nextInt scn i < n i n i++ i++ i {
            String s = scn.next();
            int p, v = scn.nextInt();
            if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            }
            ary[p][~-v]++;
        } {
            String s = scn.next();
            int p, v = scn.nextInt();
            if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            }
            ary[p][~-v]++;
        } String s = scn.next(); s scn.next() scn.next scn int p p v = scn.nextInt(); v scn.nextInt() scn.nextInt scn if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            } s.equals("S") s.equals s "S" {
                p = 0;
            } p = 0 p 0 if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            } s.equals("H") s.equals s "H" {
                p = 1;
            } p = 1 p 1 if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            } s.equals("C") s.equals s "C" {
                p = 2;
            } p = 2 p 2 {
                p = 3;
            } p = 3 p 3 ary[p][~-v]++ ary[p][~-v] ary[p] ary p ~-v -v v for(int i = 0; i < 52; i++) {
            if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            }
        } int i = 0; int i = 0; i 0 i < 52 i 52 i++ i++ i {
            if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            }
        } {
            if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            }
        } if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            } ary[i / 13][i % 13] < 1 ary[i / 13][i % 13] ary[i / 13] ary i / 13 i 13 i % 13 i 13 1 {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            } switch(i / 13) {
                  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;
                } i / 13 i 13 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; System.out.println(" " + (i % 13 + 1)) System.out.println System.out System System.out " " + (i % 13 + 1) " " (i % 13 + 1) i % 13 i 13 1 String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int[][] ary = new int[4][13];
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            String s = scn.next();
            int p, v = scn.nextInt();
            if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            }
            ary[p][~-v]++;
        }
        for(int i = 0; i < 52; i++) {
            if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int[][] ary = new int[4][13];
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            String s = scn.next();
            int p, v = scn.nextInt();
            if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            }
            ary[p][~-v]++;
        }
        for(int i = 0; i < 52; i++) {
            if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        int[][] ary = new int[4][13];
        for(int i = 0, n = scn.nextInt(); i < n; i++) {
            String s = scn.next();
            int p, v = scn.nextInt();
            if(s.equals("S")) {
                p = 0;
            } else if(s.equals("H")) {
                p = 1;
            } else if(s.equals("C")) {
                p = 2;
            } else {
                p = 3;
            }
            ary[p][~-v]++;
        }
        for(int i = 0; i < 52; i++) {
            if(ary[i / 13][i % 13] < 1) {
                switch(i / 13) {
                  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;
                }
                System.out.println(" " + (i % 13 + 1));
            }
        }
    }
}