/* ITP1_6_B */
import java.io.*;

class Main
{
  static final String[] SUIT = {"S", "H", "C", "D"};

  public static void main(String[] args)
  {
    boolean[][] cards = new boolean[4][13];

    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      int n = Integer.parseInt(br.readLine());
      if(n < 0 || n > 52) System.exit(-1);
      // check
      for(int i = 0; i < n; i++){
        String[] str = br.readLine().split(" ");
        String suit = str[0];
        int lank = Integer.parseInt(str[1]);

        if(suit.equals(SUIT[0])) cards[0][lank-1] = true;
        else if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1);
      }
      // output
      for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  }
} import java.io.*; io.* java class Main
{
  static final String[] SUIT = {"S", "H", "C", "D"};

  public static void main(String[] args)
  {
    boolean[][] cards = new boolean[4][13];

    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      int n = Integer.parseInt(br.readLine());
      if(n < 0 || n > 52) System.exit(-1);
      // check
      for(int i = 0; i < n; i++){
        String[] str = br.readLine().split(" ");
        String suit = str[0];
        int lank = Integer.parseInt(str[1]);

        if(suit.equals(SUIT[0])) cards[0][lank-1] = true;
        else if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1);
      }
      // output
      for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  }
} Main static final String[] SUIT = {"S", "H", "C", "D"}; SUIT {"S", "H", "C", "D"} "S" "H" "C" "D" public static void main(String[] args)
  {
    boolean[][] cards = new boolean[4][13];

    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      int n = Integer.parseInt(br.readLine());
      if(n < 0 || n > 52) System.exit(-1);
      // check
      for(int i = 0; i < n; i++){
        String[] str = br.readLine().split(" ");
        String suit = str[0];
        int lank = Integer.parseInt(str[1]);

        if(suit.equals(SUIT[0])) cards[0][lank-1] = true;
        else if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1);
      }
      // output
      for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  } main {
    boolean[][] cards = new boolean[4][13];

    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      int n = Integer.parseInt(br.readLine());
      if(n < 0 || n > 52) System.exit(-1);
      // check
      for(int i = 0; i < n; i++){
        String[] str = br.readLine().split(" ");
        String suit = str[0];
        int lank = Integer.parseInt(str[1]);

        if(suit.equals(SUIT[0])) cards[0][lank-1] = true;
        else if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1);
      }
      // output
      for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  } boolean[][] cards = new boolean[4][13]; cards new boolean[4][13] 4 13 try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      int n = Integer.parseInt(br.readLine());
      if(n < 0 || n > 52) System.exit(-1);
      // check
      for(int i = 0; i < n; i++){
        String[] str = br.readLine().split(" ");
        String suit = str[0];
        int lank = Integer.parseInt(str[1]);

        if(suit.equals(SUIT[0])) cards[0][lank-1] = true;
        else if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1);
      }
      // output
      for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        }
      }
      System.out.print(sb);

    }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));
      StringBuilder sb = new StringBuilder();

      int n = Integer.parseInt(br.readLine());
      if(n < 0 || n > 52) System.exit(-1);
      // check
      for(int i = 0; i < n; i++){
        String[] str = br.readLine().split(" ");
        String suit = str[0];
        int lank = Integer.parseInt(str[1]);

        if(suit.equals(SUIT[0])) cards[0][lank-1] = true;
        else if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1);
      }
      // output
      for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        }
      }
      System.out.print(sb);

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(n < 0 || n > 52) System.exit(-1); n < 0 || n > 52 n < 0 n 0 n > 52 n 52 System.exit(-1) System.exit System -1 1 for(int i = 0; i < n; i++){
        String[] str = br.readLine().split(" ");
        String suit = str[0];
        int lank = Integer.parseInt(str[1]);

        if(suit.equals(SUIT[0])) cards[0][lank-1] = true;
        else if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-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(" ");
        String suit = str[0];
        int lank = Integer.parseInt(str[1]);

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

        if(suit.equals(SUIT[0])) cards[0][lank-1] = true;
        else if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1);
      } String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " String suit = str[0]; suit str[0] str 0 int lank = Integer.parseInt(str[1]); lank Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 if(suit.equals(SUIT[0])) cards[0][lank-1] = true;
        else if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1); suit.equals(SUIT[0]) suit.equals suit SUIT[0] SUIT 0 cards[0][lank-1] = true cards[0][lank-1] cards[0] cards 0 lank-1 lank 1 true if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1); suit.equals(SUIT[1]) suit.equals suit SUIT[1] SUIT 1 cards[1][lank-1] = true cards[1][lank-1] cards[1] cards 1 lank-1 lank 1 true if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1); suit.equals(SUIT[2]) suit.equals suit SUIT[2] SUIT 2 cards[2][lank-1] = true cards[2][lank-1] cards[2] cards 2 lank-1 lank 1 true if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1); suit.equals(SUIT[3]) suit.equals suit SUIT[3] SUIT 3 cards[3][lank-1] = true cards[3][lank-1] cards[3] cards 3 lank-1 lank 1 true System.exit(-1) System.exit System -1 1 for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        }
      } 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] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        }
      } {
        for(int j = 0; j < 13; j++){
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        }
      } for(int j = 0; j < 13; j++){
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        } int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        } {
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        } if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n"); cards[i][j] != true cards[i][j] cards[i] cards i j true sb.append(SUIT[i] + " " + (j + 1) + "\n") sb.append sb SUIT[i] + " " + (j + 1) + "\n" (j + 1) SUIT[i] + " " + (j + 1) + "\n" SUIT[i] SUIT i " " (j + 1) j 1 "\n" System.out.print(sb) System.out.print System.out System System.out sb String[] args args
/* ITP1_6_B */
import java.io.*;

class Main
{
  static final String[] SUIT = {"S", "H", "C", "D"};

  public static void main(String[] args)
  {
    boolean[][] cards = new boolean[4][13];

    try{
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      StringBuilder sb = new StringBuilder();

      int n = Integer.parseInt(br.readLine());
      if(n < 0 || n > 52) System.exit(-1);
      // check
      for(int i = 0; i < n; i++){
        String[] str = br.readLine().split(" ");
        String suit = str[0];
        int lank = Integer.parseInt(str[1]);

        if(suit.equals(SUIT[0])) cards[0][lank-1] = true;
        else if(suit.equals(SUIT[1])) cards[1][lank-1] = true;
        else if(suit.equals(SUIT[2])) cards[2][lank-1] = true;
        else if(suit.equals(SUIT[3])) cards[3][lank-1] = true;
        else
          System.exit(-1);
      }
      // output
      for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
          if(cards[i][j] != true) sb.append(SUIT[i] + " " + (j + 1) + "\n");
        }
      }
      System.out.print(sb);

    }catch(Exception e){
      System.out.println(e);
    }
  }
}