#include <iostream>
#include <string>
using namespace std;

int main(){
    int n, num, S[14] = {}, C[14] = {}, H[14] = {}, D[14] = {};
    string m;
    
    cin >> n;
    
    for(int i = n;i < n;i++){
        cin >> m >> num;
        if(m == 'S'){
            S[num] = 1;
        }
        else if(m == 'C'){
            C[num] = 1;
        }
        else if(m == 'H'){
            H[num] = 1;
        }
        else if(m == 'D'){
            D[num] = 1;
        }
    }
    for(int i = 1; i < 14;i++){
        if(S[i] == 0){
            cout << "S" << i << endl;
        }
    }
    for(int i = 1; i < 14;i++){
        if(H[i] == 0){
            cout << "S" << i << endl;
        }
    }
    for(int i = 1; i < 14;i++){
        if(C[i] == 0){
            cout << "S" << i << endl;
        }
    }
    for(int i = 1; i < 14;i++){
        if(D[i] == 0){
            cout << "S" << i << endl;
        }
    }
    
    return 0;
}
