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