#include<iostream>
using namespace std;

int main(){
    bool cards[4][14];
    int n,rank;
    char suit;

    
    for(int i=0; i<4; i++)
        for(int j=1; j<=13; j++)
            cards[i][j]=0;
    
    cin>>n;
    for(int k=0; k<n; k++){
        cin>>suit>>rank;
        if (mark=='S') cards[0][rank]=1;
        if (mark=='H') cards[1][rank]=1;
        if (mark=='C') cards[2][rank]=1;
        if (mark=='D') cards[3][rank]=1;
    }
    
    for(int s=0; s<4; s++){
        for(int t=1; t<=13; t++){
            if (cards[s][t]) continue;
            if (s==0) suit=='S';
            if (s==1) suit=='H';
            if (s==2) suit=='C';
            if (s==3) suit=='D';
            
            cout<<suit<<" "<<t<<endl;
        }
    }
    
    return 0;
}
