include <stdio.h>
include <stdlib.h>
include <string.h>

int main(void){
    int n;
    int s[13] = {};
    int h[13] = {};
    int c[13] = {}:
    int d[13] = {};
    int number;
    int i;
    char mark[2];
    char input[6];

    fgets(input, sizeof(input), stdin);
    n = atoi(input);
    
    for (i = 0, i < n; i++){
        fgets(input, sizeof(input), stdin);
        mark = strtok(input, " ");
        number = strtok(NULL, " ");  
        
        switch (*mark){
            case 67:
                c[number - 1] = 1;
                break;
            case 68:
                d[number - 1] = 1;
                break;
            case 72:
                h[number - 1] = 1;
                break;
            case 83:
                s[number - 1] = 1;
                break;
    }

    for (i = 0; i < 13; i++){
        if (s[i] != 1){
            printf("S %d\n", (i + 1);
        }
    }

    for (i = 0; i < 13; i++){
        if (h[i] != 1){
            printf("H %d\n", (i + i));
        }
    }

    for (i = 0; i < 13; i++){
        if (c[i] != 1){
            printf("C %d\n", (i + i));
        }
    }

    for (i = 0; i < 13; i++){
        if (d[i] != 1){
            printf("D %d\n", (i + i));
        }
    }

    printf("\n");

    return 0;
}