import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    private static final String[] suit = {"S", "H", "C", "D"};
    
    public static void main(String[] args) {
        LinkedHashSet<String> lhss = new LinkedHashSet<>();
        for(int i = 0; i < 52; i++) {
            lhss.add(suit[i / 13] + " " + (i % 13 + 1));
        }
        for(int n = scn.nextInt(); n > 0; n--) {
            lhss.remove(scn.next() + " " + scn.next());
        }
        for(String elm : lhss) {
            System.out.println(elm);
        }
    }
} import java.util.*; util.* java public class Main {
    private static final Scanner scn = new Scanner(System.in);
    private static final String[] suit = {"S", "H", "C", "D"};
    
    public static void main(String[] args) {
        LinkedHashSet<String> lhss = new LinkedHashSet<>();
        for(int i = 0; i < 52; i++) {
            lhss.add(suit[i / 13] + " " + (i % 13 + 1));
        }
        for(int n = scn.nextInt(); n > 0; n--) {
            lhss.remove(scn.next() + " " + scn.next());
        }
        for(String elm : lhss) {
            System.out.println(elm);
        }
    }
} Main private static final Scanner scn = new Scanner(System.in); scn new Scanner(System.in) private static final String[] suit = {"S", "H", "C", "D"}; suit {"S", "H", "C", "D"} "S" "H" "C" "D" public static void main(String[] args) {
        LinkedHashSet<String> lhss = new LinkedHashSet<>();
        for(int i = 0; i < 52; i++) {
            lhss.add(suit[i / 13] + " " + (i % 13 + 1));
        }
        for(int n = scn.nextInt(); n > 0; n--) {
            lhss.remove(scn.next() + " " + scn.next());
        }
        for(String elm : lhss) {
            System.out.println(elm);
        }
    } main {
        LinkedHashSet<String> lhss = new LinkedHashSet<>();
        for(int i = 0; i < 52; i++) {
            lhss.add(suit[i / 13] + " " + (i % 13 + 1));
        }
        for(int n = scn.nextInt(); n > 0; n--) {
            lhss.remove(scn.next() + " " + scn.next());
        }
        for(String elm : lhss) {
            System.out.println(elm);
        }
    } LinkedHashSet<String> lhss = new LinkedHashSet<>(); lhss new LinkedHashSet<>() for(int i = 0; i < 52; i++) {
            lhss.add(suit[i / 13] + " " + (i % 13 + 1));
        } int i = 0; int i = 0; i 0 i < 52 i 52 i++ i++ i {
            lhss.add(suit[i / 13] + " " + (i % 13 + 1));
        } {
            lhss.add(suit[i / 13] + " " + (i % 13 + 1));
        } lhss.add(suit[i / 13] + " " + (i % 13 + 1)) lhss.add lhss suit[i / 13] + " " + (i % 13 + 1) suit[i / 13] + " " + (i % 13 + 1) suit[i / 13] suit i / 13 i 13 " " (i % 13 + 1) i % 13 i 13 1 for(int n = scn.nextInt(); n > 0; n--) {
            lhss.remove(scn.next() + " " + scn.next());
        } int n = scn.nextInt(); int n = scn.nextInt(); n scn.nextInt() scn.nextInt scn n > 0 n 0 n-- n-- n {
            lhss.remove(scn.next() + " " + scn.next());
        } {
            lhss.remove(scn.next() + " " + scn.next());
        } lhss.remove(scn.next() + " " + scn.next()) lhss.remove lhss scn.next() + " " + scn.next() scn.next() + " " + scn.next() scn.next() scn.next scn " " scn.next() scn.next scn for(String elm : lhss) {
            System.out.println(elm);
        } String elm lhss {
            System.out.println(elm);
        } {
            System.out.println(elm);
        } System.out.println(elm) System.out.println System.out System System.out elm String[] args args public class Main {
    private static final Scanner scn = new Scanner(System.in);
    private static final String[] suit = {"S", "H", "C", "D"};
    
    public static void main(String[] args) {
        LinkedHashSet<String> lhss = new LinkedHashSet<>();
        for(int i = 0; i < 52; i++) {
            lhss.add(suit[i / 13] + " " + (i % 13 + 1));
        }
        for(int n = scn.nextInt(); n > 0; n--) {
            lhss.remove(scn.next() + " " + scn.next());
        }
        for(String elm : lhss) {
            System.out.println(elm);
        }
    }
} public class Main {
    private static final Scanner scn = new Scanner(System.in);
    private static final String[] suit = {"S", "H", "C", "D"};
    
    public static void main(String[] args) {
        LinkedHashSet<String> lhss = new LinkedHashSet<>();
        for(int i = 0; i < 52; i++) {
            lhss.add(suit[i / 13] + " " + (i % 13 + 1));
        }
        for(int n = scn.nextInt(); n > 0; n--) {
            lhss.remove(scn.next() + " " + scn.next());
        }
        for(String elm : lhss) {
            System.out.println(elm);
        }
    }
} Main
import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    private static final String[] suit = {"S", "H", "C", "D"};
    
    public static void main(String[] args) {
        LinkedHashSet<String> lhss = new LinkedHashSet<>();
        for(int i = 0; i < 52; i++) {
            lhss.add(suit[i / 13] + " " + (i % 13 + 1));
        }
        for(int n = scn.nextInt(); n > 0; n--) {
            lhss.remove(scn.next() + " " + scn.next());
        }
        for(String elm : lhss) {
            System.out.println(elm);
        }
    }
}