#include<iostream>
#include<algorithm>
using namespace std;
int main(){
    char ch,card[4][13]={false};
    int n,a,i;
    cin>>n;
    faor(i=0;i<=n-1;i++){
        cin>>ch>>a;
        if(ch=='S'){
            card[0][a-1]=true;
        }if(ch=='H'){
            card[1][a-1]=true;
        }if(ch=='C'){
            card[2][a-1]=true;
        }if(ch=='D'){
            card[3][a-1]=true;
        }
       
    }
 for(int i=0; i<4; i++){
            for(int j=0; j<13;j++){
				if(card[i][j]==false){
				if(i==0)cout<<"S "<<j+1<<endl;
				else if(i==1)cout<<"H "<<j+1<<endl;
				else if(i==2)cout<<"C "<<j+1<<endl;
				else if(i==3)cout<<"D "<<j+1<<endl;
				}
            }
        }
    return 0;
}
