import java.util.*;
class Main{
  public static void main(String[] args) {
    Scanner scan= new Scanner(System.in);
    boolean[][] trump = new boolean[4][13];
    char[] head = {'S' , 'H' , 'C' , 'D'};
    int n = scan.nextInt();
    for (int i = 0; i < n ; i++ ) {
      char head_in = scan.next().charAt(0);
      int num = Integer.parseInt(scan.next());

      switch(head_in){
        case 'S':trump[0][num-1] = true;break;
        case 'H':trump[1][num-1] = true;break;
        case 'C':trump[2][num-1] = true;break;
        case 'D':trump[3][num-1] = true;break;
      }
    }
    for (int i =0 ;i < 4 ;i++ ) {
      for (int j = 0;j < 13 ;j++ ) {
        if (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        }

      }

    }
  }
} import java.util.*; util.* java class Main{
  public static void main(String[] args) {
    Scanner scan= new Scanner(System.in);
    boolean[][] trump = new boolean[4][13];
    char[] head = {'S' , 'H' , 'C' , 'D'};
    int n = scan.nextInt();
    for (int i = 0; i < n ; i++ ) {
      char head_in = scan.next().charAt(0);
      int num = Integer.parseInt(scan.next());

      switch(head_in){
        case 'S':trump[0][num-1] = true;break;
        case 'H':trump[1][num-1] = true;break;
        case 'C':trump[2][num-1] = true;break;
        case 'D':trump[3][num-1] = true;break;
      }
    }
    for (int i =0 ;i < 4 ;i++ ) {
      for (int j = 0;j < 13 ;j++ ) {
        if (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        }

      }

    }
  }
} Main public static void main(String[] args) {
    Scanner scan= new Scanner(System.in);
    boolean[][] trump = new boolean[4][13];
    char[] head = {'S' , 'H' , 'C' , 'D'};
    int n = scan.nextInt();
    for (int i = 0; i < n ; i++ ) {
      char head_in = scan.next().charAt(0);
      int num = Integer.parseInt(scan.next());

      switch(head_in){
        case 'S':trump[0][num-1] = true;break;
        case 'H':trump[1][num-1] = true;break;
        case 'C':trump[2][num-1] = true;break;
        case 'D':trump[3][num-1] = true;break;
      }
    }
    for (int i =0 ;i < 4 ;i++ ) {
      for (int j = 0;j < 13 ;j++ ) {
        if (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        }

      }

    }
  } main {
    Scanner scan= new Scanner(System.in);
    boolean[][] trump = new boolean[4][13];
    char[] head = {'S' , 'H' , 'C' , 'D'};
    int n = scan.nextInt();
    for (int i = 0; i < n ; i++ ) {
      char head_in = scan.next().charAt(0);
      int num = Integer.parseInt(scan.next());

      switch(head_in){
        case 'S':trump[0][num-1] = true;break;
        case 'H':trump[1][num-1] = true;break;
        case 'C':trump[2][num-1] = true;break;
        case 'D':trump[3][num-1] = true;break;
      }
    }
    for (int i =0 ;i < 4 ;i++ ) {
      for (int j = 0;j < 13 ;j++ ) {
        if (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        }

      }

    }
  } Scanner scan= new Scanner(System.in); scan new Scanner(System.in) boolean[][] trump = new boolean[4][13]; trump new boolean[4][13] 4 13 char[] head = {'S' , 'H' , 'C' , 'D'}; head {'S' , 'H' , 'C' , 'D'} 'S' 'H' 'C' 'D' int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan for (int i = 0; i < n ; i++ ) {
      char head_in = scan.next().charAt(0);
      int num = Integer.parseInt(scan.next());

      switch(head_in){
        case 'S':trump[0][num-1] = true;break;
        case 'H':trump[1][num-1] = true;break;
        case 'C':trump[2][num-1] = true;break;
        case 'D':trump[3][num-1] = true;break;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      char head_in = scan.next().charAt(0);
      int num = Integer.parseInt(scan.next());

      switch(head_in){
        case 'S':trump[0][num-1] = true;break;
        case 'H':trump[1][num-1] = true;break;
        case 'C':trump[2][num-1] = true;break;
        case 'D':trump[3][num-1] = true;break;
      }
    } {
      char head_in = scan.next().charAt(0);
      int num = Integer.parseInt(scan.next());

      switch(head_in){
        case 'S':trump[0][num-1] = true;break;
        case 'H':trump[1][num-1] = true;break;
        case 'C':trump[2][num-1] = true;break;
        case 'D':trump[3][num-1] = true;break;
      }
    } char head_in = scan.next().charAt(0); head_in scan.next().charAt(0) scan.next().charAt scan.next() scan.next scan 0 int num = Integer.parseInt(scan.next()); num Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan switch(head_in){
        case 'S':trump[0][num-1] = true;break;
        case 'H':trump[1][num-1] = true;break;
        case 'C':trump[2][num-1] = true;break;
        case 'D':trump[3][num-1] = true;break;
      } head_in case 'S': 'S' case 'S': trump[0][num-1] = true trump[0][num-1] trump[0] trump 0 num-1 num 1 true break; case 'H': 'H' case 'H': trump[1][num-1] = true trump[1][num-1] trump[1] trump 1 num-1 num 1 true break; case 'C': 'C' case 'C': trump[2][num-1] = true trump[2][num-1] trump[2] trump 2 num-1 num 1 true break; case 'D': 'D' case 'D': trump[3][num-1] = true trump[3][num-1] trump[3] trump 3 num-1 num 1 true break; for (int i =0 ;i < 4 ;i++ ) {
      for (int j = 0;j < 13 ;j++ ) {
        if (trump[i][j] == false) {
          System.out.println(head[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 (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        }

      }

    } {
      for (int j = 0;j < 13 ;j++ ) {
        if (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        }

      }

    } for (int j = 0;j < 13 ;j++ ) {
        if (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        }

      } int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
        if (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        }

      } {
        if (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        }

      } if (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        } trump[i][j] == false trump[i][j] trump[i] trump i j false {
          System.out.println(head[i]+" "+(j+1));

        } System.out.println(head[i]+" "+(j+1)) System.out.println System.out System System.out head[i]+" "+(j+1) head[i]+" "+(j+1) head[i] head i " " (j+1) j 1 String[] args args
import java.util.*;
class Main{
  public static void main(String[] args) {
    Scanner scan= new Scanner(System.in);
    boolean[][] trump = new boolean[4][13];
    char[] head = {'S' , 'H' , 'C' , 'D'};
    int n = scan.nextInt();
    for (int i = 0; i < n ; i++ ) {
      char head_in = scan.next().charAt(0);
      int num = Integer.parseInt(scan.next());

      switch(head_in){
        case 'S':trump[0][num-1] = true;break;
        case 'H':trump[1][num-1] = true;break;
        case 'C':trump[2][num-1] = true;break;
        case 'D':trump[3][num-1] = true;break;
      }
    }
    for (int i =0 ;i < 4 ;i++ ) {
      for (int j = 0;j < 13 ;j++ ) {
        if (trump[i][j] == false) {
          System.out.println(head[i]+" "+(j+1));

        }

      }

    }
  }
}