// ITP1_6_B Finding Missing Cards
import java.io.*;

public class Main {
   private static boolean[][] cards = new boolean[4][13];
   private static String[] suit = {"S", "H", "C", "D"};

   public static void main(String[] args) {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(br.readLine());
         if (n <= 52 && n >= 0) {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         }
      }
      catch (Exception e) {
         System.out.println(e);
      }
   }
} import java.io.*; io.* java public class Main {
   private static boolean[][] cards = new boolean[4][13];
   private static String[] suit = {"S", "H", "C", "D"};

   public static void main(String[] args) {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(br.readLine());
         if (n <= 52 && n >= 0) {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         }
      }
      catch (Exception e) {
         System.out.println(e);
      }
   }
} Main private static boolean[][] cards = new boolean[4][13]; cards new boolean[4][13] 4 13 private static String[] suit = {"S", "H", "C", "D"}; suit {"S", "H", "C", "D"} "S" "H" "C" "D" public static void main(String[] args) {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(br.readLine());
         if (n <= 52 && n >= 0) {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         }
      }
      catch (Exception e) {
         System.out.println(e);
      }
   } main {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(br.readLine());
         if (n <= 52 && n >= 0) {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         }
      }
      catch (Exception e) {
         System.out.println(e);
      }
   } try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(br.readLine());
         if (n <= 52 && n >= 0) {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         }
      }
      catch (Exception e) {
         System.out.println(e);
      } catch (Exception e) {
         System.out.println(e);
      } Exception e {
         System.out.println(e);
      } System.out.println(e) System.out.println System.out System System.out e {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(br.readLine());
         if (n <= 52 && n >= 0) {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         }
      } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if (n <= 52 && n >= 0) {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         } n <= 52 && n >= 0 n <= 52 n 52 n >= 0 n 0 {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         } for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            } {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            } String str[] = (br.readLine()).split(" "); str (br.readLine()).split(" ") (br.readLine()).split (br.readLine()) br.readLine br " " if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1); str[0].equals(suit[0]) str[0].equals str[0] str 0 suit[0] suit 0 cards[0][Integer.parseInt(str[1]) - 1] = true cards[0][Integer.parseInt(str[1]) - 1] cards[0] cards 0 Integer.parseInt(str[1]) - 1 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 1 true if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1); str[0].equals(suit[1]) str[0].equals str[0] str 0 suit[1] suit 1 cards[1][Integer.parseInt(str[1]) - 1] = true cards[1][Integer.parseInt(str[1]) - 1] cards[1] cards 1 Integer.parseInt(str[1]) - 1 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 1 true if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1); str[0].equals(suit[2]) str[0].equals str[0] str 0 suit[2] suit 2 cards[2][Integer.parseInt(str[1]) - 1] = true cards[2][Integer.parseInt(str[1]) - 1] cards[2] cards 2 Integer.parseInt(str[1]) - 1 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 1 true if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1); str[0].equals(suit[3]) str[0].equals str[0] str 0 suit[3] suit 3 cards[3][Integer.parseInt(str[1]) - 1] = true cards[3][Integer.parseInt(str[1]) - 1] cards[3] cards 3 Integer.parseInt(str[1]) - 1 Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 1 true System.exit(1) System.exit System 1 for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], 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 (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            } {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            } for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               } int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               } {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               } if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1); cards[i][j] == false cards[i][j] cards[i] cards i j false System.out.printf("%s %d\n", suit[i], j + 1) System.out.printf System.out System System.out "%s %d\n" suit[i] suit i j + 1 j 1 String[] args args public class Main {
   private static boolean[][] cards = new boolean[4][13];
   private static String[] suit = {"S", "H", "C", "D"};

   public static void main(String[] args) {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(br.readLine());
         if (n <= 52 && n >= 0) {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         }
      }
      catch (Exception e) {
         System.out.println(e);
      }
   }
} public class Main {
   private static boolean[][] cards = new boolean[4][13];
   private static String[] suit = {"S", "H", "C", "D"};

   public static void main(String[] args) {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(br.readLine());
         if (n <= 52 && n >= 0) {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         }
      }
      catch (Exception e) {
         System.out.println(e);
      }
   }
} Main
// ITP1_6_B Finding Missing Cards
import java.io.*;

public class Main {
   private static boolean[][] cards = new boolean[4][13];
   private static String[] suit = {"S", "H", "C", "D"};

   public static void main(String[] args) {
      try {
         BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
         int n = Integer.parseInt(br.readLine());
         if (n <= 52 && n >= 0) {
            for (int i = 0; i < n; i++) {
               String str[] = (br.readLine()).split(" ");

               if (str[0].equals(suit[0]))
                  cards[0][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[1]))
                  cards[1][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[2]))
                  cards[2][Integer.parseInt(str[1]) - 1] = true;
               else if (str[0].equals(suit[3]))
                  cards[3][Integer.parseInt(str[1]) - 1] = true;
               else
                  System.exit(1);
            }

            for (int i = 0; i < 4; i++) {
               for (int j = 0; j < 13; j++) {
                  if (cards[i][j] == false)
                     System.out.printf("%s %d\n", suit[i], j + 1);
               }
            }
         }
      }
      catch (Exception e) {
         System.out.println(e);
      }
   }
}