import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();
        boolean[][] cards = new boolean[4][13];
        for(int i = 0; i < x; i++){
            String s = input.next();
            int num = input.nextInt();
            switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            }
        }
        for(int i = 0; i < cards.length; i++){
            for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            }
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();
        boolean[][] cards = new boolean[4][13];
        for(int i = 0; i < x; i++){
            String s = input.next();
            int num = input.nextInt();
            switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            }
        }
        for(int i = 0; i < cards.length; i++){
            for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            }
        }
    }
} Main public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();
        boolean[][] cards = new boolean[4][13];
        for(int i = 0; i < x; i++){
            String s = input.next();
            int num = input.nextInt();
            switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            }
        }
        for(int i = 0; i < cards.length; i++){
            for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            }
        }
    } main {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();
        boolean[][] cards = new boolean[4][13];
        for(int i = 0; i < x; i++){
            String s = input.next();
            int num = input.nextInt();
            switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            }
        }
        for(int i = 0; i < cards.length; i++){
            for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            }
        }
    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int x = input.nextInt(); x input.nextInt() input.nextInt input boolean[][] cards = new boolean[4][13]; cards new boolean[4][13] 4 13 for(int i = 0; i < x; i++){
            String s = input.next();
            int num = input.nextInt();
            switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            }
        } int i = 0; int i = 0; i 0 i < x i x i++ i++ i {
            String s = input.next();
            int num = input.nextInt();
            switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            }
        } {
            String s = input.next();
            int num = input.nextInt();
            switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            }
        } String s = input.next(); s input.next() input.next input int num = input.nextInt(); num input.nextInt() input.nextInt input switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            } s case "S": "S" case "S": cards[0][num-1] = true cards[0][num-1] cards[0] cards 0 num-1 num 1 true break; case "H": "H" case "H": cards[1][num-1] = true cards[1][num-1] cards[1] cards 1 num-1 num 1 true break; case "C": "C" case "C": cards[2][num-1] = true cards[2][num-1] cards[2] cards 2 num-1 num 1 true break; case "D": "D" case "D": cards[3][num-1] = true cards[3][num-1] cards[3] cards 3 num-1 num 1 true break; for(int i = 0; i < cards.length; i++){
            for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            }
        } int i = 0; int i = 0; i 0 i < cards.length i cards.length cards cards.length i++ i++ i {
            for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            }
        } {
            for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            }
        } for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            } int n = 0; int n = 0; n 0 n < cards[i].length n cards[i].length cards[i] cards i cards[i].length n++ n++ n {
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            } {
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            } if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                } !cards[i][n] cards[i][n] cards[i] cards i n {
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                } switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    } i case 0: 0 case 0: System.out.println("S "+(n+1)) System.out.println System.out System System.out "S "+(n+1) "S " (n+1) n 1 break; case 1: 1 case 1: System.out.println("H "+(n+1)) System.out.println System.out System System.out "H "+(n+1) "H " (n+1) n 1 break; case 2: 2 case 2: System.out.println("C "+(n+1)) System.out.println System.out System System.out "C "+(n+1) "C " (n+1) n 1 break; case 3: 3 case 3: System.out.println("D "+(n+1)) System.out.println System.out System System.out "D "+(n+1) "D " (n+1) n 1 break; String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();
        boolean[][] cards = new boolean[4][13];
        for(int i = 0; i < x; i++){
            String s = input.next();
            int num = input.nextInt();
            switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            }
        }
        for(int i = 0; i < cards.length; i++){
            for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            }
        }
    }
} public class Main {

    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();
        boolean[][] cards = new boolean[4][13];
        for(int i = 0; i < x; i++){
            String s = input.next();
            int num = input.nextInt();
            switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            }
        }
        for(int i = 0; i < cards.length; i++){
            for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            }
        }
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) throws Exception {
        Scanner input = new Scanner(System.in);
        int x = input.nextInt();
        boolean[][] cards = new boolean[4][13];
        for(int i = 0; i < x; i++){
            String s = input.next();
            int num = input.nextInt();
            switch(s){
                case "S":
                    cards[0][num-1] = true;
                    break;
                case "H":
                    cards[1][num-1] = true;
                    break;
                case "C":
                    cards[2][num-1] = true;
                    break;
                case "D":
                    cards[3][num-1] = true;
                    break;
            }
        }
        for(int i = 0; i < cards.length; i++){
            for(int n = 0; n < cards[i].length; n++){
                if(!cards[i][n]){
                    switch(i){
                        case 0:
                            System.out.println("S "+(n+1));
                            break;
                        case 1:
                            System.out.println("H "+(n+1));
                            break;
                        case 2:
                            System.out.println("C "+(n+1));
                            break;
                        case 3:
                            System.out.println("D "+(n+1));
                            break;
                    }
                }
            }
        }
    }
}