#include <iostream>
using namespace std;
??
int main(){
    int n;

    bool l[4][13];
    for(int i = 0; i < 4; i++){
        for(int j = 0; j < 13; j++){
            l[i][j] = false;
        }
    }
    
    cin >> n;

    for(int i = 0; i < n; i++){
        char mark;
        int number;
        cin >> mark >> number;
        switch(mark){
            case 'S': l[0][number-1] = true; break;
            case 'H': l[1][number-1] = true; break;
            case 'C': l[2][number-1] = true; break;
            case 'D': l[3][number-1] = true; break;
        }
    }

    //0:S
    for(int j = 0; j < 13; j++){
        if(l[0][j] == false){
            cout << "S " << j+1 << endl;
        }
    }

    //1:H
    for(int j = 0; j < 13; j++){
        if(l[1][j] == false){
            cout << "H " << j+1 << endl;
        }
    }

    //2:C
    for(int j = 0; j < 13; j++){
        if(l[2][j] == false){
            cout << "C " << j+1 << endl;
        }
    }

    //3:D
    for(int j = 0; j < 13; j++){
        if(l[3][j] == false){
            cout << "D " << j+1 << endl;
        }
    }

    return(0);
}