#include<stdio.h>
int main(){
    unsigned short num;
    unsigned short i, j, k;
    unsigned short rank;
    unsigned char mark;
    unsigned char dia[13];
    unsigned char spade[13];
    unsigned char crabb[13];
    unsigned char hert[13];
    for(i = 0;i < 13;i++){
        dia[i] = 0;
        spade[i] = 0;
        crabb[i] = 0;
        hert[i] = 0;
    }
    scanf("%d", &num);
    for(i = 0;i < num;i++){
        scanf("%c %d", &mark, &rank);
        swicth(mark){
        case 'D':
            dia[rank - 1] = 1;
            break;
        case 'S':
            spade[rank - 1] = 1;
            break;
        case 'C':
            crabb[rank - 1] = 1;
            break;
        case 'H':
            hert[rank - 1] = 1;
            break;
        defoult:;
        }
    }
    for(i = 0;i < 13;i++){
        if(dia[i] == 0){
            printf("D %d\n", i);
        }
        if(spade[i] == 0){
            printf("S %d\n", i);
        }
        if(crabb[i] == 0){
            printf("C %d\n", i);
        }
        if(hert[i] == 0){
            printf("H %d\n", i);
        }
    }
    return 0;
}
