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);

    }
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz