#include <stdio.h>

int main() {
    int card, rank, i, j;
    int deck[4][14] = {0};
    char ch;
    char suit[] = "SHCD"
    
    scanf("%d", &card);
    for(i = 1; i <= card; i++) {
        scanf(" %c %d", &ch, &rank);
        
        switch (ch) {
            case 'S':
                deck[0][rank - 1] = 1;
                break;
            case 'H':
                deck[1][rank - 1] = 1;
                break;
            case 'C':
                deck[2][rank - 1] = 1;
                break;
            case 'D':
                deck[3][rank - 1] = 1;
                break;
            default:
                break;
        }
    }
    
    for(i = 0; i < 4; i++) {
        for(j = 0; j < 13; j++) {
            if(deck[i][j] = 0) {
                printf("%c %d\n", suit[i], j + 1);   
            }
        }
    }
    
    return 0;
}
