int main(void) 
{
    int n, i, j, a, cards[4][13] = { {0} };
    char egara, gara[5] = "SHCD";

    scanf("%d", &n);

    for (i = 0;i < n;i++)
    {
        scanf("%c", &egara);
        scanf("%c %d", &egara, &a);
            
        for (j = 0;j < 4;j++)
        {
            if (gara[j] == egara)
            {
                cards[j][a - 1] = 1;
            }
        }        
    }

    for (i = 0;i < 4;i++)
    {
        for (j = 0;j < 13;i++)
        {
            printf("%c %d\n", gara[i], j + 1);
        }
    }
    return 0;
}
