#include<iostream>
#include<vector>
using namespace std;
int main(){
    int n;
    cin >> n;
    char c;
    int a;
    vector < vector <int> > X(4,13);
    char M[4]={'S', 'C', 'H', 'D'};
    for (int i=0; i<n; i++){
        cin >> c >> a;
        for (int j=0; j<4; j++){
            if (M[j]==c) X[j][a-1]=1;
        }
    }
        
    for (int i=0; i<4; i++){
        for (int j=0; j<13; j++){
            if (X[i][j]!=1) cout << M[i] << ' ' << j+1 << endl;
        }
    }
}