import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Main {
    private static Map<String, List<Integer>> cardsPerMark = new HashMap<>();
    static {
        cardsPerMark.put("S", createCardsList());
        cardsPerMark.put("H", createCardsList());
        cardsPerMark.put("C", createCardsList());
        cardsPerMark.put("D", createCardsList());
    }

    public static void main(String[] args) {
        Map<String, List<Integer>> inputCardsPerMark = new HashMap<>();
        inputCardsPerMark.put("S", new ArrayList<>());
        inputCardsPerMark.put("H", new ArrayList<>());
        inputCardsPerMark.put("C", new ArrayList<>());
        inputCardsPerMark.put("D", new ArrayList<>());

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            String mark = sc.next();
            int number = sc.nextInt();

            List<Integer> numbers = inputCardsPerMark.get(mark);
            numbers.add(number);
            inputCardsPerMark.put(mark, numbers);
        }

        for (String mark : Stream.of("S", "H", "C", "D").collect(Collectors.toList())) {
            List<Integer> numbers = cardsPerMark.get(mark);
            List<Integer> inputNumbers = inputCardsPerMark.get(mark);
            numbers.removeAll(inputNumbers);
            for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            }
        }
        sc.close();
    }

    private static List<Integer> createCardsList() {
        List<Integer> cardsList = new ArrayList<>();
        for (int i = 1; i <= 13; i++) {
            cardsList.add(i);
        }
        return cardsList;
    }
} import java.util.ArrayList; ArrayList java.util import java.util.HashMap; HashMap java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Scanner; Scanner java.util import java.util.stream.Collectors; Collectors java.util.stream import java.util.stream.Stream; Stream java.util.stream public class Main {
    private static Map<String, List<Integer>> cardsPerMark = new HashMap<>();
    static {
        cardsPerMark.put("S", createCardsList());
        cardsPerMark.put("H", createCardsList());
        cardsPerMark.put("C", createCardsList());
        cardsPerMark.put("D", createCardsList());
    }

    public static void main(String[] args) {
        Map<String, List<Integer>> inputCardsPerMark = new HashMap<>();
        inputCardsPerMark.put("S", new ArrayList<>());
        inputCardsPerMark.put("H", new ArrayList<>());
        inputCardsPerMark.put("C", new ArrayList<>());
        inputCardsPerMark.put("D", new ArrayList<>());

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            String mark = sc.next();
            int number = sc.nextInt();

            List<Integer> numbers = inputCardsPerMark.get(mark);
            numbers.add(number);
            inputCardsPerMark.put(mark, numbers);
        }

        for (String mark : Stream.of("S", "H", "C", "D").collect(Collectors.toList())) {
            List<Integer> numbers = cardsPerMark.get(mark);
            List<Integer> inputNumbers = inputCardsPerMark.get(mark);
            numbers.removeAll(inputNumbers);
            for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            }
        }
        sc.close();
    }

    private static List<Integer> createCardsList() {
        List<Integer> cardsList = new ArrayList<>();
        for (int i = 1; i <= 13; i++) {
            cardsList.add(i);
        }
        return cardsList;
    }
} Main private static Map<String, List<Integer>> cardsPerMark = new HashMap<>(); cardsPerMark new HashMap<>() public static void main(String[] args) {
        Map<String, List<Integer>> inputCardsPerMark = new HashMap<>();
        inputCardsPerMark.put("S", new ArrayList<>());
        inputCardsPerMark.put("H", new ArrayList<>());
        inputCardsPerMark.put("C", new ArrayList<>());
        inputCardsPerMark.put("D", new ArrayList<>());

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            String mark = sc.next();
            int number = sc.nextInt();

            List<Integer> numbers = inputCardsPerMark.get(mark);
            numbers.add(number);
            inputCardsPerMark.put(mark, numbers);
        }

        for (String mark : Stream.of("S", "H", "C", "D").collect(Collectors.toList())) {
            List<Integer> numbers = cardsPerMark.get(mark);
            List<Integer> inputNumbers = inputCardsPerMark.get(mark);
            numbers.removeAll(inputNumbers);
            for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            }
        }
        sc.close();
    } main {
        Map<String, List<Integer>> inputCardsPerMark = new HashMap<>();
        inputCardsPerMark.put("S", new ArrayList<>());
        inputCardsPerMark.put("H", new ArrayList<>());
        inputCardsPerMark.put("C", new ArrayList<>());
        inputCardsPerMark.put("D", new ArrayList<>());

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            String mark = sc.next();
            int number = sc.nextInt();

            List<Integer> numbers = inputCardsPerMark.get(mark);
            numbers.add(number);
            inputCardsPerMark.put(mark, numbers);
        }

        for (String mark : Stream.of("S", "H", "C", "D").collect(Collectors.toList())) {
            List<Integer> numbers = cardsPerMark.get(mark);
            List<Integer> inputNumbers = inputCardsPerMark.get(mark);
            numbers.removeAll(inputNumbers);
            for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            }
        }
        sc.close();
    } Map<String, List<Integer>> inputCardsPerMark = new HashMap<>(); inputCardsPerMark new HashMap<>() inputCardsPerMark.put("S", new ArrayList<>()) inputCardsPerMark.put inputCardsPerMark "S" new ArrayList<>() inputCardsPerMark.put("H", new ArrayList<>()) inputCardsPerMark.put inputCardsPerMark "H" new ArrayList<>() inputCardsPerMark.put("C", new ArrayList<>()) inputCardsPerMark.put inputCardsPerMark "C" new ArrayList<>() inputCardsPerMark.put("D", new ArrayList<>()) inputCardsPerMark.put inputCardsPerMark "D" new ArrayList<>() Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc for (int i = 0; i < n; i++) {
            String mark = sc.next();
            int number = sc.nextInt();

            List<Integer> numbers = inputCardsPerMark.get(mark);
            numbers.add(number);
            inputCardsPerMark.put(mark, numbers);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String mark = sc.next();
            int number = sc.nextInt();

            List<Integer> numbers = inputCardsPerMark.get(mark);
            numbers.add(number);
            inputCardsPerMark.put(mark, numbers);
        } {
            String mark = sc.next();
            int number = sc.nextInt();

            List<Integer> numbers = inputCardsPerMark.get(mark);
            numbers.add(number);
            inputCardsPerMark.put(mark, numbers);
        } String mark = sc.next(); mark sc.next() sc.next sc int number = sc.nextInt(); number sc.nextInt() sc.nextInt sc List<Integer> numbers = inputCardsPerMark.get(mark); numbers inputCardsPerMark.get(mark) inputCardsPerMark.get inputCardsPerMark mark numbers.add(number) numbers.add numbers number inputCardsPerMark.put(mark, numbers) inputCardsPerMark.put inputCardsPerMark mark numbers for (String mark : Stream.of("S", "H", "C", "D").collect(Collectors.toList())) {
            List<Integer> numbers = cardsPerMark.get(mark);
            List<Integer> inputNumbers = inputCardsPerMark.get(mark);
            numbers.removeAll(inputNumbers);
            for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            }
        } String mark Stream.of("S", "H", "C", "D").collect(Collectors.toList()) Stream.of("S", "H", "C", "D").collect Stream.of("S", "H", "C", "D") Stream.of Stream "S" "H" "C" "D" Collectors.toList() Collectors.toList Collectors {
            List<Integer> numbers = cardsPerMark.get(mark);
            List<Integer> inputNumbers = inputCardsPerMark.get(mark);
            numbers.removeAll(inputNumbers);
            for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            }
        } {
            List<Integer> numbers = cardsPerMark.get(mark);
            List<Integer> inputNumbers = inputCardsPerMark.get(mark);
            numbers.removeAll(inputNumbers);
            for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            }
        } List<Integer> numbers = cardsPerMark.get(mark); numbers cardsPerMark.get(mark) cardsPerMark.get cardsPerMark mark List<Integer> inputNumbers = inputCardsPerMark.get(mark); inputNumbers inputCardsPerMark.get(mark) inputCardsPerMark.get inputCardsPerMark mark numbers.removeAll(inputNumbers) numbers.removeAll numbers inputNumbers for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            } Integer number numbers {
                System.out.printf("%s %d\n", mark, number);
            } {
                System.out.printf("%s %d\n", mark, number);
            } System.out.printf("%s %d\n", mark, number) System.out.printf System.out System System.out "%s %d\n" mark number sc.close() sc.close sc String[] args args private static List<Integer> createCardsList() {
        List<Integer> cardsList = new ArrayList<>();
        for (int i = 1; i <= 13; i++) {
            cardsList.add(i);
        }
        return cardsList;
    } createCardsList {
        List<Integer> cardsList = new ArrayList<>();
        for (int i = 1; i <= 13; i++) {
            cardsList.add(i);
        }
        return cardsList;
    } List<Integer> cardsList = new ArrayList<>(); cardsList new ArrayList<>() for (int i = 1; i <= 13; i++) {
            cardsList.add(i);
        } int i = 1; int i = 1; i 1 i <= 13 i 13 i++ i++ i {
            cardsList.add(i);
        } {
            cardsList.add(i);
        } cardsList.add(i) cardsList.add cardsList i return cardsList; cardsList public class Main {
    private static Map<String, List<Integer>> cardsPerMark = new HashMap<>();
    static {
        cardsPerMark.put("S", createCardsList());
        cardsPerMark.put("H", createCardsList());
        cardsPerMark.put("C", createCardsList());
        cardsPerMark.put("D", createCardsList());
    }

    public static void main(String[] args) {
        Map<String, List<Integer>> inputCardsPerMark = new HashMap<>();
        inputCardsPerMark.put("S", new ArrayList<>());
        inputCardsPerMark.put("H", new ArrayList<>());
        inputCardsPerMark.put("C", new ArrayList<>());
        inputCardsPerMark.put("D", new ArrayList<>());

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            String mark = sc.next();
            int number = sc.nextInt();

            List<Integer> numbers = inputCardsPerMark.get(mark);
            numbers.add(number);
            inputCardsPerMark.put(mark, numbers);
        }

        for (String mark : Stream.of("S", "H", "C", "D").collect(Collectors.toList())) {
            List<Integer> numbers = cardsPerMark.get(mark);
            List<Integer> inputNumbers = inputCardsPerMark.get(mark);
            numbers.removeAll(inputNumbers);
            for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            }
        }
        sc.close();
    }

    private static List<Integer> createCardsList() {
        List<Integer> cardsList = new ArrayList<>();
        for (int i = 1; i <= 13; i++) {
            cardsList.add(i);
        }
        return cardsList;
    }
} public class Main {
    private static Map<String, List<Integer>> cardsPerMark = new HashMap<>();
    static {
        cardsPerMark.put("S", createCardsList());
        cardsPerMark.put("H", createCardsList());
        cardsPerMark.put("C", createCardsList());
        cardsPerMark.put("D", createCardsList());
    }

    public static void main(String[] args) {
        Map<String, List<Integer>> inputCardsPerMark = new HashMap<>();
        inputCardsPerMark.put("S", new ArrayList<>());
        inputCardsPerMark.put("H", new ArrayList<>());
        inputCardsPerMark.put("C", new ArrayList<>());
        inputCardsPerMark.put("D", new ArrayList<>());

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            String mark = sc.next();
            int number = sc.nextInt();

            List<Integer> numbers = inputCardsPerMark.get(mark);
            numbers.add(number);
            inputCardsPerMark.put(mark, numbers);
        }

        for (String mark : Stream.of("S", "H", "C", "D").collect(Collectors.toList())) {
            List<Integer> numbers = cardsPerMark.get(mark);
            List<Integer> inputNumbers = inputCardsPerMark.get(mark);
            numbers.removeAll(inputNumbers);
            for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            }
        }
        sc.close();
    }

    private static List<Integer> createCardsList() {
        List<Integer> cardsList = new ArrayList<>();
        for (int i = 1; i <= 13; i++) {
            cardsList.add(i);
        }
        return cardsList;
    }
} Main
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Main {
    private static Map<String, List<Integer>> cardsPerMark = new HashMap<>();
    static {
        cardsPerMark.put("S", createCardsList());
        cardsPerMark.put("H", createCardsList());
        cardsPerMark.put("C", createCardsList());
        cardsPerMark.put("D", createCardsList());
    }

    public static void main(String[] args) {
        Map<String, List<Integer>> inputCardsPerMark = new HashMap<>();
        inputCardsPerMark.put("S", new ArrayList<>());
        inputCardsPerMark.put("H", new ArrayList<>());
        inputCardsPerMark.put("C", new ArrayList<>());
        inputCardsPerMark.put("D", new ArrayList<>());

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = 0; i < n; i++) {
            String mark = sc.next();
            int number = sc.nextInt();

            List<Integer> numbers = inputCardsPerMark.get(mark);
            numbers.add(number);
            inputCardsPerMark.put(mark, numbers);
        }

        for (String mark : Stream.of("S", "H", "C", "D").collect(Collectors.toList())) {
            List<Integer> numbers = cardsPerMark.get(mark);
            List<Integer> inputNumbers = inputCardsPerMark.get(mark);
            numbers.removeAll(inputNumbers);
            for (Integer number : numbers) {
                System.out.printf("%s %d\n", mark, number);
            }
        }
        sc.close();
    }

    private static List<Integer> createCardsList() {
        List<Integer> cardsList = new ArrayList<>();
        for (int i = 1; i <= 13; i++) {
            cardsList.add(i);
        }
        return cardsList;
    }
}
