#include <bits/stdc++.h>
using namespace std;

int main(){
           int n;
           cin>>n;
           int a[4][13];
           for(int x=0;x<n;x++){
           string str;
           int number;
           cin>>str>>number;
    
           if(str==“S”) a[0][number-1] = 1;
           if(str==“H”) a[1][number-1] = 1;
           if(str==“C”) a[2][number-1] = 1;
           if(str==“D”) a[3][number-1] = 1;
           }
        
           string str2[4] = {“S”,”H”,”C”,”D”};
           for(int i=0;i<4;i++){
                for(int j=0;j<13;j++){
                    if(a[i][j] == 1) continue;
                    cout<<str2[i]<<“ “<<j+1<<endl;
           }
     return 0;
}
