#include <iostream>
#include <cstdio>

using namespace std;

void outPut(int Array[],char suit){
    for(int i = 1; i <= 13; i++){
        if(Array[i] == 0) printf("%c %d\n",suit,i);
    }
}

int main(){
    int n, S[14], H[14], D[14], C[14], buf;
    char suit;
    cin >> n;
    S = H = D = C = {0};
    for(int i = 0; i < n; i++){
        scanf("%s %d", suit, &buf);
        
        switch (suit)
        {
            case 'S':
                S[buf] = 1;
                break;
            case 'H':
                H[buf] = 1;
                break;
            case 'D':
                D[buf] = 1;
                break;
            case 'C':
                C[buf] = 1;
                break;
        }
    } 
    outPut(S,'S');
    outPut(H,'H');
    outPut(C,'C');
    outPut(D,'D');
}
