import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            String type = sc.next();
            if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            }
        }
        Arrays.sort(a);
        for (int i = 1, j = 0; i <= 52; i++) {
            if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            }
        }
    }
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            String type = sc.next();
            if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            }
        }
        Arrays.sort(a);
        for (int i = 1, j = 0; i <= 52; i++) {
            if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            String type = sc.next();
            if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            }
        }
        Arrays.sort(a);
        for (int i = 1, j = 0; i <= 52; i++) {
            if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            String type = sc.next();
            if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            }
        }
        Arrays.sort(a);
        for (int i = 1, j = 0; i <= 52; i++) {
            if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int[] a = new int[n]; a new int[n] n for (int i = 0; i < n; i++) {
            String type = sc.next();
            if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            String type = sc.next();
            if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            }
        } {
            String type = sc.next();
            if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            }
        } String type = sc.next(); type sc.next() sc.next sc if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            } type.equals("S") type.equals type "S" {
                a[i] = sc.nextInt() + 100;
            } a[i] = sc.nextInt() + 100 a[i] a i sc.nextInt() + 100 sc.nextInt() sc.nextInt sc 100 if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            } type.equals("H") type.equals type "H" {
                a[i] = sc.nextInt() + 200;
            } a[i] = sc.nextInt() + 200 a[i] a i sc.nextInt() + 200 sc.nextInt() sc.nextInt sc 200 if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            } type.equals("C") type.equals type "C" {
                a[i] = sc.nextInt() + 300;
            } a[i] = sc.nextInt() + 300 a[i] a i sc.nextInt() + 300 sc.nextInt() sc.nextInt sc 300 if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            } type.equals("D") type.equals type "D" {
                a[i] = sc.nextInt() + 400;
            } a[i] = sc.nextInt() + 400 a[i] a i sc.nextInt() + 400 sc.nextInt() sc.nextInt sc 400 Arrays.sort(a) Arrays.sort Arrays a for (int i = 1, j = 0; i <= 52; i++) {
            if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            }
        } int i = 1, j = 0; int i = 1 i 1 j = 0; j 0 i <= 52 i 52 i++ i++ i {
            if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            }
        } {
            if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            }
        } if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            } i <= 13 i 13 { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                } n > j && a[j] == 100 + i n > j n j a[j] == 100 + i a[j] a j 100 + i 100 i {
                    j++;
                } j++ j {
                    System.out.println("S " + i);
                } System.out.println("S " + i) System.out.println System.out System System.out "S " + i "S " i if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            } i <= 26 i 26 { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                } n > j && a[j] == 200 + i - 13 n > j n j a[j] == 200 + i - 13 a[j] a j 200 + i - 13 200 + i 200 i 13 {
                    j++;
                } j++ j {
                    System.out.println("H " + (i - 13));
                } System.out.println("H " + (i - 13)) System.out.println System.out System System.out "H " + (i - 13) "H " (i - 13) i 13 if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            } i <= 39 i 39 { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                } n > j && a[j] == 300 + i - 26 n > j n j a[j] == 300 + i - 26 a[j] a j 300 + i - 26 300 + i 300 i 26 {
                    j++;
                } j++ j {
                    System.out.println("C " + (i - 26));
                } System.out.println("C " + (i - 26)) System.out.println System.out System System.out "C " + (i - 26) "C " (i - 26) i 26 { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            } if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                } n > j && a[j] == 400 + i - 39 n > j n j a[j] == 400 + i - 39 a[j] a j 400 + i - 39 400 + i 400 i 39 {
                    j++;
                } j++ j {
                    System.out.println("D " + (i - 39));
                } System.out.println("D " + (i - 39)) System.out.println System.out System System.out "D " + (i - 39) "D " (i - 39) i 39 String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            String type = sc.next();
            if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            }
        }
        Arrays.sort(a);
        for (int i = 1, j = 0; i <= 52; i++) {
            if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            }
        }
    }
} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            String type = sc.next();
            if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            }
        }
        Arrays.sort(a);
        for (int i = 1, j = 0; i <= 52; i++) {
            if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            }
        }
    }
} Main
import java.util.Arrays;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            String type = sc.next();
            if (type.equals("S")) {
                a[i] = sc.nextInt() + 100;
            } else if (type.equals("H")) {
                a[i] = sc.nextInt() + 200;
            } else if (type.equals("C")) {
                a[i] = sc.nextInt() + 300;
            } else if (type.equals("D")) {
                a[i] = sc.nextInt() + 400;
            }
        }
        Arrays.sort(a);
        for (int i = 1, j = 0; i <= 52; i++) {
            if (i <= 13) { //spade
                if (n > j && a[j] == 100 + i) {
                    j++;
                } else {
                    System.out.println("S " + i);
                }
            } else if (i <= 26) { //heart
                if (n > j && a[j] == 200 + i - 13) {
                    j++;
                } else {
                    System.out.println("H " + (i - 13));
                }
            } else if (i <= 39) { //club
                if (n > j && a[j] == 300 + i - 26) {
                    j++;
                } else {
                    System.out.println("C " + (i - 26));
                }
            } else { //dia
                if (n > j && a[j] == 400 + i - 39) {
                    j++;
                } else {
                    System.out.println("D " + (i - 39));
                }
            }
        }
    }
}