int main(void) {

    int i, j, all, num, check[4][13] = {{0}};
    char s[4] = {'S', 'H', 'C', 'D'}, suit;
    scanf("%d", &all);
    while (scanf("%*c%c %d", &suit, &num) != EOF) {
        switch (suit) {
            case 'S' : check[0][num - 1] = 1; break;
            case 'H' : check[1][num - 1] = 1; break;
            case 'C' : check[2][num - 1] = 1; break;
            case 'D' : check[3][num - 1] = 1; break;
        }
    }
    for (i = 0; i < 4; i++)
        for (j = 0; j < 13; j++)
            if (check[i][j] == 0)
                printf("%c %d\n", s[i], j + 1);
    return 0;
}