#include <iostream>
using namespace std;

int main()
{
    int cards[4][13];
    char kind;
    int number;
    int n;
    int i, j;
    char kinds[4] = {"S", "H", "C", "D"};
    cin >> n;

    for (i = 0; i < 4; i++)
    {
        for (j = 1; j < 14; j++)
        {

            cards[i][j] = false;
        }
    }

    for (i = 0; i < n; i++)
    {
        cin >> kind >> number;
        if (kind == 'S')
        {
            cards[0][number - 1] = true;
        }
        if (kind == 'H')
        {
            cards[1][number - 1] = true;
        }
        if (kind == 'C')
        {
            cards[2][number - 1] = true;
        }
        if (kind == 'D')
        {
            cards[3][number - 1] = true;
        }
    }


    for (i = 0; i < 4; i++)
    {
        for (j = 1; j < 14; j++)
        {

            if (cards[i][j - 1] != true)
            {
                cout << kinds[i] << ' ' << j << endl;
            }
        }
    }
}
