import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        boolean[][] card = new boolean[4][13];

        String input = br.readLine();

//      ???????????????????????????????????????????????°
        int n = Integer.parseInt(input);

        for(int i = 0; i < n; i++){
            input = br.readLine();
            String[] strArray = input.split(" ");

            String egara = strArray[0]; //?????????????????????
            int number = Integer.parseInt(strArray[1]); //?????????????????°???

            if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            }
        }

        for(int i = 0; i < 4; i++){
            for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(output);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        boolean[][] card = new boolean[4][13];

        String input = br.readLine();

//      ???????????????????????????????????????????????°
        int n = Integer.parseInt(input);

        for(int i = 0; i < n; i++){
            input = br.readLine();
            String[] strArray = input.split(" ");

            String egara = strArray[0]; //?????????????????????
            int number = Integer.parseInt(strArray[1]); //?????????????????°???

            if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            }
        }

        for(int i = 0; i < 4; i++){
            for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(output);
    }
} Main public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        boolean[][] card = new boolean[4][13];

        String input = br.readLine();

//      ???????????????????????????????????????????????°
        int n = Integer.parseInt(input);

        for(int i = 0; i < n; i++){
            input = br.readLine();
            String[] strArray = input.split(" ");

            String egara = strArray[0]; //?????????????????????
            int number = Integer.parseInt(strArray[1]); //?????????????????°???

            if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            }
        }

        for(int i = 0; i < 4; i++){
            for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(output);
    } main {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        boolean[][] card = new boolean[4][13];

        String input = br.readLine();

//      ???????????????????????????????????????????????°
        int n = Integer.parseInt(input);

        for(int i = 0; i < n; i++){
            input = br.readLine();
            String[] strArray = input.split(" ");

            String egara = strArray[0]; //?????????????????????
            int number = Integer.parseInt(strArray[1]); //?????????????????°???

            if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            }
        }

        for(int i = 0; i < 4; i++){
            for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(output);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder output = new StringBuilder(); output new StringBuilder() boolean[][] card = new boolean[4][13]; card new boolean[4][13] 4 13 String input = br.readLine(); input br.readLine() br.readLine br int n = Integer.parseInt(input); n Integer.parseInt(input) Integer.parseInt Integer input for(int i = 0; i < n; i++){
            input = br.readLine();
            String[] strArray = input.split(" ");

            String egara = strArray[0]; //?????????????????????
            int number = Integer.parseInt(strArray[1]); //?????????????????°???

            if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            input = br.readLine();
            String[] strArray = input.split(" ");

            String egara = strArray[0]; //?????????????????????
            int number = Integer.parseInt(strArray[1]); //?????????????????°???

            if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            }
        } {
            input = br.readLine();
            String[] strArray = input.split(" ");

            String egara = strArray[0]; //?????????????????????
            int number = Integer.parseInt(strArray[1]); //?????????????????°???

            if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            }
        } input = br.readLine() input br.readLine() br.readLine br String[] strArray = input.split(" "); strArray input.split(" ") input.split input " " String egara = strArray[0]; egara strArray[0] strArray 0 int number = Integer.parseInt(strArray[1]); number Integer.parseInt(strArray[1]) Integer.parseInt Integer strArray[1] strArray 1 if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            } egara.equals("S") egara.equals egara "S" {
                card[0][number-1] = true;

            } card[0][number-1] = true card[0][number-1] card[0] card 0 number-1 number 1 true if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            } egara.equals("H") egara.equals egara "H" {
                card[1][number-1] = true;

            } card[1][number-1] = true card[1][number-1] card[1] card 1 number-1 number 1 true if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            } egara.equals("C") egara.equals egara "C" {
                card[2][number-1] = true;

            } card[2][number-1] = true card[2][number-1] card[2] card 2 number-1 number 1 true if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            } egara.equals("D") egara.equals egara "D" {
                card[3][number-1] = true;

            } card[3][number-1] = true card[3][number-1] card[3] card 3 number-1 number 1 true {
                break;
            } break; for(int i = 0; i < 4; i++){
            for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            }
        } int i = 0; int i = 0; i 0 i < 4 i 4 i++ i++ i {
            for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            }
        } {
            for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            }
        } for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            } int j = 0; int j = 0; j 0 j < 13 j 13 j++ j++ j {
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            } {
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            } if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                } card[i][j] == false card[i][j] card[i] card i j false {
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                } if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    } i == 0 i 0 {
                        output.append("S");

                    } output.append("S") output.append output "S" if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    } i == 1 i 1 {
                        output.append("H");

                    } output.append("H") output.append output "H" if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    } i == 2 i 2 {
                        output.append("C");

                    } output.append("C") output.append output "C" if(i == 3){
                        output.append("D");
                    } i == 3 i 3 {
                        output.append("D");
                    } output.append("D") output.append output "D" output.append(" ").append(j+1).append("\n") output.append(" ").append(j+1).append output.append(" ").append(j+1) output.append(" ").append output.append(" ") output.append output " " j+1 j 1 "\n" System.out.print(output) System.out.print System.out System System.out output String[] args args public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        boolean[][] card = new boolean[4][13];

        String input = br.readLine();

//      ???????????????????????????????????????????????°
        int n = Integer.parseInt(input);

        for(int i = 0; i < n; i++){
            input = br.readLine();
            String[] strArray = input.split(" ");

            String egara = strArray[0]; //?????????????????????
            int number = Integer.parseInt(strArray[1]); //?????????????????°???

            if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            }
        }

        for(int i = 0; i < 4; i++){
            for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(output);
    }
} public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        boolean[][] card = new boolean[4][13];

        String input = br.readLine();

//      ???????????????????????????????????????????????°
        int n = Integer.parseInt(input);

        for(int i = 0; i < n; i++){
            input = br.readLine();
            String[] strArray = input.split(" ");

            String egara = strArray[0]; //?????????????????????
            int number = Integer.parseInt(strArray[1]); //?????????????????°???

            if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            }
        }

        for(int i = 0; i < 4; i++){
            for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(output);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args) throws IOException {

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder output = new StringBuilder();
        boolean[][] card = new boolean[4][13];

        String input = br.readLine();

//      ???????????????????????????????????????????????°
        int n = Integer.parseInt(input);

        for(int i = 0; i < n; i++){
            input = br.readLine();
            String[] strArray = input.split(" ");

            String egara = strArray[0]; //?????????????????????
            int number = Integer.parseInt(strArray[1]); //?????????????????°???

            if(egara.equals("S")){
                card[0][number-1] = true;

            }else if(egara.equals("H")){
                card[1][number-1] = true;

            }else if(egara.equals("C")){
                card[2][number-1] = true;

            }else if(egara.equals("D")){
                card[3][number-1] = true;

            }else{
                break;
            }
        }

        for(int i = 0; i < 4; i++){
            for(int j = 0; j < 13; j++){
                if(card[i][j] == false){
                    if(i == 0){
                        output.append("S");

                    }else if(i == 1){
                        output.append("H");

                    }else if(i == 2){
                        output.append("C");

                    }else if(i == 3){
                        output.append("D");
                    }
                    output.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(output);
    }
}