include<cstdio>
int main(){
    intn;
    int card[52]={0};
    scanf(“ %d”, &n);
    for(int i=1;i<=n;i++){
        char c;
        int a;
        scanf(“ %c %d”, &c, &a);
        if(c==‘S’) card[a-1]=1;
        else if(c==’H’) card[a-1+13]=1;
        else if(c==‘C’) card[a-1+26]=1;
        else if(c==‘D’) card[a-1+39]=1;
        
    }
    for(int i=1;i<=52;++i){
        if(card[i]==0){
            if(i<=12)printf(“S “);
            else if(i<=25)printf(“H “);
            else if(i<=38)printf(“C “);
            else if(i<=51)printf(“D “);
            
            printf(”%d\n”,i%13+1);
        }
        
    }
    
}
