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

int main() {
    bool tramp[4][13];
    for(int a = 0; a < 4; ++a) {
        for(int b = 0; b < 13; ++b) {
            tramp[a][b] = false;
        }
    }
    
    int N;
    char kind;
    int number,e;

    cin >> N;

    for(int c = 0; c < N; ++c) {
        cin >> kind >> number;
        switch(kind) {
            case "S":
             e = 0;
             break;
            case "H":
             e = 1;
             break;
            case "C":
             e = 2;
             break;
            case "D":
             e = 3;
             break;
        }
        tramp[e][number] = true;
    }

    char kind2;

    for(int f = 0; f < 4; ++f) {
        for(int g = 0; g < 4; ++ g) {
            if(number[f][g] == false) {
                switch(f) {
                    case 0;
                     kind2 = "S";
                     break
                    case 1;
                     kind2 = "H";
                     break;
                    case 2:
                     kind2 = "C";
                     break;
                    case 3;
                     kind2 = "D";
                     break; 
                }
                cout << kind2 << " " << g << endl;
            }
        }
    }
}