#include <stdio.h>

typedef enum{S, H, D, C} SUIT;

int main(void){
    int cards[4][13], n, r;
    char s;
    char suits[] = "SHDC";

    scanf("%d", &n);
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
             cards[i][j]=0;
        }
    }
    for (int i=0; i<n; i++){
        scanf("%c %d", &s, &r);
        switch (s){
        case 'S':
            cards[S][r]=1;
            break;
        case 'D':
            cards[S][r]=1;
            break;
        case 'H':
            cards[S][r]=1;
            break;
        case 'C':
            cards[S][r]=1;
            break;
    }
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
             if (cards[i][j]==0){
                 printf("%c %d\n", suits[i], j);
        }
    }

    printf("\n");
    return 0;
}