import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int n = Integer.parseInt(line);

        int[][] flag = new int[4][13];
        for(int i = 0; i < n; i++) {
          line = sc.nextLine();
          String[] l = line.split(" ");

          int D = 0;
          if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          }

          int N = Integer.parseInt(l[1]) - 1;

          flag[D][N] = 1;
        }

        for(int i = 0; i < 4; i++) {
          for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          }
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int n = Integer.parseInt(line);

        int[][] flag = new int[4][13];
        for(int i = 0; i < n; i++) {
          line = sc.nextLine();
          String[] l = line.split(" ");

          int D = 0;
          if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          }

          int N = Integer.parseInt(l[1]) - 1;

          flag[D][N] = 1;
        }

        for(int i = 0; i < 4; i++) {
          for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int n = Integer.parseInt(line);

        int[][] flag = new int[4][13];
        for(int i = 0; i < n; i++) {
          line = sc.nextLine();
          String[] l = line.split(" ");

          int D = 0;
          if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          }

          int N = Integer.parseInt(l[1]) - 1;

          flag[D][N] = 1;
        }

        for(int i = 0; i < 4; i++) {
          for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int n = Integer.parseInt(line);

        int[][] flag = new int[4][13];
        for(int i = 0; i < n; i++) {
          line = sc.nextLine();
          String[] l = line.split(" ");

          int D = 0;
          if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          }

          int N = Integer.parseInt(l[1]) - 1;

          flag[D][N] = 1;
        }

        for(int i = 0; i < 4; i++) {
          for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc int n = Integer.parseInt(line); n Integer.parseInt(line) Integer.parseInt Integer line int[][] flag = new int[4][13]; flag new int[4][13] 4 13 for(int i = 0; i < n; i++) {
          line = sc.nextLine();
          String[] l = line.split(" ");

          int D = 0;
          if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          }

          int N = Integer.parseInt(l[1]) - 1;

          flag[D][N] = 1;
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
          line = sc.nextLine();
          String[] l = line.split(" ");

          int D = 0;
          if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          }

          int N = Integer.parseInt(l[1]) - 1;

          flag[D][N] = 1;
        } {
          line = sc.nextLine();
          String[] l = line.split(" ");

          int D = 0;
          if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          }

          int N = Integer.parseInt(l[1]) - 1;

          flag[D][N] = 1;
        } line = sc.nextLine() line sc.nextLine() sc.nextLine sc String[] l = line.split(" "); l line.split(" ") line.split line " " int D = 0; D 0 if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          } l[0].equals("S") l[0].equals l[0] l 0 "S" {
            D = 0;
          } D = 0 D 0 if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          } l[0].equals("H") l[0].equals l[0] l 0 "H" {
            D = 1;
          } D = 1 D 1 if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          } l[0].equals("C") l[0].equals l[0] l 0 "C" {
            D = 2;
          } D = 2 D 2 if(l[0].equals("D")) {
            D = 3;
          } l[0].equals("D") l[0].equals l[0] l 0 "D" {
            D = 3;
          } D = 3 D 3 int N = Integer.parseInt(l[1]) - 1; N Integer.parseInt(l[1]) - 1 Integer.parseInt(l[1]) Integer.parseInt Integer l[1] l 1 1 flag[D][N] = 1 flag[D][N] flag[D] flag D N 1 for(int i = 0; i < 4; i++) {
          for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          }
        } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
          for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          }
        } {
          for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          }
        } for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          } int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          } {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          } String DD = ""; DD "" if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            } flag[i][j] != 1 flag[i][j] flag[i] flag i j 1 {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            } if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              } i == 0 i 0 {
                DD = "S";
              } DD = "S" DD "S" if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              } i == 1 i 1 {
                DD = "H";
              } DD = "H" DD "H" if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              } i == 2 i 2 {
                DD = "C";
              } DD = "C" DD "C" if(i == 3) {
                DD = "D";
              } i == 3 i 3 {
                DD = "D";
              } DD = "D" DD "D" int J = j + 1; J j + 1 j 1 System.out.println(DD + " " + J) System.out.println System.out System System.out DD + " " + J DD + " " + J DD " " J String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int n = Integer.parseInt(line);

        int[][] flag = new int[4][13];
        for(int i = 0; i < n; i++) {
          line = sc.nextLine();
          String[] l = line.split(" ");

          int D = 0;
          if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          }

          int N = Integer.parseInt(l[1]) - 1;

          flag[D][N] = 1;
        }

        for(int i = 0; i < 4; i++) {
          for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int n = Integer.parseInt(line);

        int[][] flag = new int[4][13];
        for(int i = 0; i < n; i++) {
          line = sc.nextLine();
          String[] l = line.split(" ");

          int D = 0;
          if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          }

          int N = Integer.parseInt(l[1]) - 1;

          flag[D][N] = 1;
        }

        for(int i = 0; i < 4; i++) {
          for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          }
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int n = Integer.parseInt(line);

        int[][] flag = new int[4][13];
        for(int i = 0; i < n; i++) {
          line = sc.nextLine();
          String[] l = line.split(" ");

          int D = 0;
          if(l[0].equals("S")) {
            D = 0;
          } else if(l[0].equals("H")) {
            D = 1;
          } else if(l[0].equals("C")) {
            D = 2;
          } else if(l[0].equals("D")) {
            D = 3;
          }

          int N = Integer.parseInt(l[1]) - 1;

          flag[D][N] = 1;
        }

        for(int i = 0; i < 4; i++) {
          for(int j = 0; j < 13; j++) {

            String DD = "";
            if(flag[i][j] != 1) {

              if(i == 0) {
                DD = "S";
              } else if(i == 1) {
                DD = "H";
              } else if(i == 2) {
                DD = "C";
              } else if(i == 3) {
                DD = "D";
              }

              int J = j + 1;
              System.out.println(DD + " " + J);
            }
          }
        }
    }
}