import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Scanner;

/**
 * Created 2017/06/11.
 */
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    
    //?????¶????????¨??????????????????
    LinkedHashMap<String,LinkedHashSet<Integer>> dr = new LinkedHashMap<>();
    String s = "S";
    String h = "H";
    String c = "C";
    String d = "D";
    
    dr.put(s,rankmake());
    dr.put(h,rankmake());
    dr.put(c,rankmake());
    dr.put(d,rankmake());
    
    //System.out.println(dr); 
    //??\????????\?????¨????????????

    int n = sc.nextInt();
    for(int i = 0; i < n; i++) {
      String d_input = sc.next();
      int r_input = sc.nextInt();
      dr.get(d_input).remove(r_input);
    }
    //??¨?????????????????????
    //System.out.println(dr); //????????????
    
    //?????????????????¨??????hashset??????????¨??????????????????????for?????§??¨??¨??¨????????????????????§
    for(String key : dr.keySet()){
      LinkedHashSet<Integer> r_end =dr.get(key);
      for(int i : r_end){
        System.out.println(key + " " + i);
      }
    }

  }
  public static LinkedHashSet<Integer> rankmake() {
    LinkedHashSet<Integer> rank = new LinkedHashSet<>();
    for(int i = 1;i <=13;i++){
      rank.add(i);
    }
    return rank;
  }
} import java.util.LinkedHashMap; LinkedHashMap java.util import java.util.LinkedHashSet; LinkedHashSet java.util import java.util.Scanner; Scanner java.util public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    
    //?????¶????????¨??????????????????
    LinkedHashMap<String,LinkedHashSet<Integer>> dr = new LinkedHashMap<>();
    String s = "S";
    String h = "H";
    String c = "C";
    String d = "D";
    
    dr.put(s,rankmake());
    dr.put(h,rankmake());
    dr.put(c,rankmake());
    dr.put(d,rankmake());
    
    //System.out.println(dr); 
    //??\????????\?????¨????????????

    int n = sc.nextInt();
    for(int i = 0; i < n; i++) {
      String d_input = sc.next();
      int r_input = sc.nextInt();
      dr.get(d_input).remove(r_input);
    }
    //??¨?????????????????????
    //System.out.println(dr); //????????????
    
    //?????????????????¨??????hashset??????????¨??????????????????????for?????§??¨??¨??¨????????????????????§
    for(String key : dr.keySet()){
      LinkedHashSet<Integer> r_end =dr.get(key);
      for(int i : r_end){
        System.out.println(key + " " + i);
      }
    }

  }
  public static LinkedHashSet<Integer> rankmake() {
    LinkedHashSet<Integer> rank = new LinkedHashSet<>();
    for(int i = 1;i <=13;i++){
      rank.add(i);
    }
    return rank;
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    
    //?????¶????????¨??????????????????
    LinkedHashMap<String,LinkedHashSet<Integer>> dr = new LinkedHashMap<>();
    String s = "S";
    String h = "H";
    String c = "C";
    String d = "D";
    
    dr.put(s,rankmake());
    dr.put(h,rankmake());
    dr.put(c,rankmake());
    dr.put(d,rankmake());
    
    //System.out.println(dr); 
    //??\????????\?????¨????????????

    int n = sc.nextInt();
    for(int i = 0; i < n; i++) {
      String d_input = sc.next();
      int r_input = sc.nextInt();
      dr.get(d_input).remove(r_input);
    }
    //??¨?????????????????????
    //System.out.println(dr); //????????????
    
    //?????????????????¨??????hashset??????????¨??????????????????????for?????§??¨??¨??¨????????????????????§
    for(String key : dr.keySet()){
      LinkedHashSet<Integer> r_end =dr.get(key);
      for(int i : r_end){
        System.out.println(key + " " + i);
      }
    }

  } main {
    Scanner sc = new Scanner(System.in);
    
    
    //?????¶????????¨??????????????????
    LinkedHashMap<String,LinkedHashSet<Integer>> dr = new LinkedHashMap<>();
    String s = "S";
    String h = "H";
    String c = "C";
    String d = "D";
    
    dr.put(s,rankmake());
    dr.put(h,rankmake());
    dr.put(c,rankmake());
    dr.put(d,rankmake());
    
    //System.out.println(dr); 
    //??\????????\?????¨????????????

    int n = sc.nextInt();
    for(int i = 0; i < n; i++) {
      String d_input = sc.next();
      int r_input = sc.nextInt();
      dr.get(d_input).remove(r_input);
    }
    //??¨?????????????????????
    //System.out.println(dr); //????????????
    
    //?????????????????¨??????hashset??????????¨??????????????????????for?????§??¨??¨??¨????????????????????§
    for(String key : dr.keySet()){
      LinkedHashSet<Integer> r_end =dr.get(key);
      for(int i : r_end){
        System.out.println(key + " " + i);
      }
    }

  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) LinkedHashMap<String,LinkedHashSet<Integer>> dr = new LinkedHashMap<>(); dr new LinkedHashMap<>() String s = "S"; s "S" String h = "H"; h "H" String c = "C"; c "C" String d = "D"; d "D" dr.put(s,rankmake()) dr.put dr s rankmake() rankmake dr.put(h,rankmake()) dr.put dr h rankmake() rankmake dr.put(c,rankmake()) dr.put dr c rankmake() rankmake dr.put(d,rankmake()) dr.put dr d rankmake() rankmake int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for(int i = 0; i < n; i++) {
      String d_input = sc.next();
      int r_input = sc.nextInt();
      dr.get(d_input).remove(r_input);
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      String d_input = sc.next();
      int r_input = sc.nextInt();
      dr.get(d_input).remove(r_input);
    } {
      String d_input = sc.next();
      int r_input = sc.nextInt();
      dr.get(d_input).remove(r_input);
    } String d_input = sc.next(); d_input sc.next() sc.next sc int r_input = sc.nextInt(); r_input sc.nextInt() sc.nextInt sc dr.get(d_input).remove(r_input) dr.get(d_input).remove dr.get(d_input) dr.get dr d_input r_input for(String key : dr.keySet()){
      LinkedHashSet<Integer> r_end =dr.get(key);
      for(int i : r_end){
        System.out.println(key + " " + i);
      }
    } String key dr.keySet() dr.keySet dr {
      LinkedHashSet<Integer> r_end =dr.get(key);
      for(int i : r_end){
        System.out.println(key + " " + i);
      }
    } {
      LinkedHashSet<Integer> r_end =dr.get(key);
      for(int i : r_end){
        System.out.println(key + " " + i);
      }
    } LinkedHashSet<Integer> r_end =dr.get(key); r_end dr.get(key) dr.get dr key for(int i : r_end){
        System.out.println(key + " " + i);
      } int i r_end {
        System.out.println(key + " " + i);
      } {
        System.out.println(key + " " + i);
      } System.out.println(key + " " + i) System.out.println System.out System System.out key + " " + i key + " " + i key " " i String[] args args public static LinkedHashSet<Integer> rankmake() {
    LinkedHashSet<Integer> rank = new LinkedHashSet<>();
    for(int i = 1;i <=13;i++){
      rank.add(i);
    }
    return rank;
  } rankmake {
    LinkedHashSet<Integer> rank = new LinkedHashSet<>();
    for(int i = 1;i <=13;i++){
      rank.add(i);
    }
    return rank;
  } LinkedHashSet<Integer> rank = new LinkedHashSet<>(); rank new LinkedHashSet<>() for(int i = 1;i <=13;i++){
      rank.add(i);
    } int i = 1; int i = 1; i 1 i <=13 i 13 i++ i++ i {
      rank.add(i);
    } {
      rank.add(i);
    } rank.add(i) rank.add rank i return rank; rank public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    
    //?????¶????????¨??????????????????
    LinkedHashMap<String,LinkedHashSet<Integer>> dr = new LinkedHashMap<>();
    String s = "S";
    String h = "H";
    String c = "C";
    String d = "D";
    
    dr.put(s,rankmake());
    dr.put(h,rankmake());
    dr.put(c,rankmake());
    dr.put(d,rankmake());
    
    //System.out.println(dr); 
    //??\????????\?????¨????????????

    int n = sc.nextInt();
    for(int i = 0; i < n; i++) {
      String d_input = sc.next();
      int r_input = sc.nextInt();
      dr.get(d_input).remove(r_input);
    }
    //??¨?????????????????????
    //System.out.println(dr); //????????????
    
    //?????????????????¨??????hashset??????????¨??????????????????????for?????§??¨??¨??¨????????????????????§
    for(String key : dr.keySet()){
      LinkedHashSet<Integer> r_end =dr.get(key);
      for(int i : r_end){
        System.out.println(key + " " + i);
      }
    }

  }
  public static LinkedHashSet<Integer> rankmake() {
    LinkedHashSet<Integer> rank = new LinkedHashSet<>();
    for(int i = 1;i <=13;i++){
      rank.add(i);
    }
    return rank;
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    
    //?????¶????????¨??????????????????
    LinkedHashMap<String,LinkedHashSet<Integer>> dr = new LinkedHashMap<>();
    String s = "S";
    String h = "H";
    String c = "C";
    String d = "D";
    
    dr.put(s,rankmake());
    dr.put(h,rankmake());
    dr.put(c,rankmake());
    dr.put(d,rankmake());
    
    //System.out.println(dr); 
    //??\????????\?????¨????????????

    int n = sc.nextInt();
    for(int i = 0; i < n; i++) {
      String d_input = sc.next();
      int r_input = sc.nextInt();
      dr.get(d_input).remove(r_input);
    }
    //??¨?????????????????????
    //System.out.println(dr); //????????????
    
    //?????????????????¨??????hashset??????????¨??????????????????????for?????§??¨??¨??¨????????????????????§
    for(String key : dr.keySet()){
      LinkedHashSet<Integer> r_end =dr.get(key);
      for(int i : r_end){
        System.out.println(key + " " + i);
      }
    }

  }
  public static LinkedHashSet<Integer> rankmake() {
    LinkedHashSet<Integer> rank = new LinkedHashSet<>();
    for(int i = 1;i <=13;i++){
      rank.add(i);
    }
    return rank;
  }
} Main
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.Scanner;

/**
 * Created 2017/06/11.
 */
public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    
    
    //?????¶????????¨??????????????????
    LinkedHashMap<String,LinkedHashSet<Integer>> dr = new LinkedHashMap<>();
    String s = "S";
    String h = "H";
    String c = "C";
    String d = "D";
    
    dr.put(s,rankmake());
    dr.put(h,rankmake());
    dr.put(c,rankmake());
    dr.put(d,rankmake());
    
    //System.out.println(dr); 
    //??\????????\?????¨????????????

    int n = sc.nextInt();
    for(int i = 0; i < n; i++) {
      String d_input = sc.next();
      int r_input = sc.nextInt();
      dr.get(d_input).remove(r_input);
    }
    //??¨?????????????????????
    //System.out.println(dr); //????????????
    
    //?????????????????¨??????hashset??????????¨??????????????????????for?????§??¨??¨??¨????????????????????§
    for(String key : dr.keySet()){
      LinkedHashSet<Integer> r_end =dr.get(key);
      for(int i : r_end){
        System.out.println(key + " " + i);
      }
    }

  }
  public static LinkedHashSet<Integer> rankmake() {
    LinkedHashSet<Integer> rank = new LinkedHashSet<>();
    for(int i = 1;i <=13;i++){
      rank.add(i);
    }
    return rank;
  }
}