import java.io.*;

public class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int[][] card = new int[4][13];

        int sheets = Integer.parseInt(br.readLine());
        for(int i=0; i<sheets; i++){
            String[] str = br.readLine().split(" ");
            int num = Integer.parseInt(str[1]);
            if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break;
        }

        for(int i=0; i<4; i++){
            for(int j=0; j<13; j++){
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(sb);

    }
} import java.io.*; io.* java public class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int[][] card = new int[4][13];

        int sheets = Integer.parseInt(br.readLine());
        for(int i=0; i<sheets; i++){
            String[] str = br.readLine().split(" ");
            int num = Integer.parseInt(str[1]);
            if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break;
        }

        for(int i=0; i<4; i++){
            for(int j=0; j<13; j++){
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(sb);

    }
} Main public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int[][] card = new int[4][13];

        int sheets = Integer.parseInt(br.readLine());
        for(int i=0; i<sheets; i++){
            String[] str = br.readLine().split(" ");
            int num = Integer.parseInt(str[1]);
            if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break;
        }

        for(int i=0; i<4; i++){
            for(int j=0; j<13; j++){
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(sb);

    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int[][] card = new int[4][13];

        int sheets = Integer.parseInt(br.readLine());
        for(int i=0; i<sheets; i++){
            String[] str = br.readLine().split(" ");
            int num = Integer.parseInt(str[1]);
            if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break;
        }

        for(int i=0; i<4; i++){
            for(int j=0; j<13; j++){
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(sb);

    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int[][] card = new int[4][13]; card new int[4][13] 4 13 int sheets = Integer.parseInt(br.readLine()); sheets Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br for(int i=0; i<sheets; i++){
            String[] str = br.readLine().split(" ");
            int num = Integer.parseInt(str[1]);
            if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break;
        } int i=0; int i=0; i 0 i<sheets i sheets i++ i++ i {
            String[] str = br.readLine().split(" ");
            int num = Integer.parseInt(str[1]);
            if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break;
        } {
            String[] str = br.readLine().split(" ");
            int num = Integer.parseInt(str[1]);
            if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break;
        } String[] str = br.readLine().split(" "); str br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int num = Integer.parseInt(str[1]); num Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break; str[0].equals("S") str[0].equals str[0] str 0 "S" {
                card[0][num-1] = 1;
            } card[0][num-1] = 1 card[0][num-1] card[0] card 0 num-1 num 1 1 if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break; str[0].equals("H") str[0].equals str[0] str 0 "H" {
                card[1][num-1] = 1;
            } card[1][num-1] = 1 card[1][num-1] card[1] card 1 num-1 num 1 1 if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break; str[0].equals("C") str[0].equals str[0] str 0 "C" {
                card[2][num-1] = 1;
            } card[2][num-1] = 1 card[2][num-1] card[2] card 2 num-1 num 1 1 if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break; str[0].equals("D") str[0].equals str[0] str 0 "D" {
                card[3][num-1] = 1;
            } card[3][num-1] = 1 card[3][num-1] card[3] card 3 num-1 num 1 1 break; for(int i=0; i<4; i++){
            for(int j=0; j<13; j++){
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.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] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            }
        } {
            for(int j=0; j<13; j++){
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            }
        } for(int j=0; j<13; j++){
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.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] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            } {
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            } if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                } card[i][j] == 0 card[i][j] card[i] card i j 0 {
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                } if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    } i == 0 i 0 {
                        sb.append("S");
                    } sb.append("S") sb.append sb "S" if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    } i == 1 i 1 {
                        sb.append("H");
                    } sb.append("H") sb.append sb "H" if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    } i == 2 i 2 {
                        sb.append("C");
                    } sb.append("C") sb.append sb "C" if(i == 3){
                        sb.append("D");
                    } i == 3 i 3 {
                        sb.append("D");
                    } sb.append("D") sb.append sb "D" sb.append(" ").append(j+1).append("\n") sb.append(" ").append(j+1).append sb.append(" ").append(j+1) sb.append(" ").append sb.append(" ") sb.append sb " " j+1 j 1 "\n" System.out.print(sb) System.out.print System.out System System.out sb String[]args args public class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int[][] card = new int[4][13];

        int sheets = Integer.parseInt(br.readLine());
        for(int i=0; i<sheets; i++){
            String[] str = br.readLine().split(" ");
            int num = Integer.parseInt(str[1]);
            if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break;
        }

        for(int i=0; i<4; i++){
            for(int j=0; j<13; j++){
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(sb);

    }
} public class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int[][] card = new int[4][13];

        int sheets = Integer.parseInt(br.readLine());
        for(int i=0; i<sheets; i++){
            String[] str = br.readLine().split(" ");
            int num = Integer.parseInt(str[1]);
            if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break;
        }

        for(int i=0; i<4; i++){
            for(int j=0; j<13; j++){
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(sb);

    }
} Main
import java.io.*;

public class Main{
    public static void main(String[]args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        int[][] card = new int[4][13];

        int sheets = Integer.parseInt(br.readLine());
        for(int i=0; i<sheets; i++){
            String[] str = br.readLine().split(" ");
            int num = Integer.parseInt(str[1]);
            if(str[0].equals("S")){
                card[0][num-1] = 1;
            }else if(str[0].equals("H")){
                card[1][num-1] = 1;
            }else if(str[0].equals("C")){
                card[2][num-1] = 1;
            }else if(str[0].equals("D")){
                card[3][num-1] = 1;
            }else break;
        }

        for(int i=0; i<4; i++){
            for(int j=0; j<13; j++){
                if( card[i][j] == 0){
                    if(i == 0){
                        sb.append("S");
                    }else if(i == 1){
                        sb.append("H");
                    }else if(i == 2){
                        sb.append("C");
                    }else if(i == 3){
                        sb.append("D");
                    }
                    sb.append(" ").append(j+1).append("\n");
                }
            }
        }
        System.out.print(sb);

    }
}