#include <stdio.h>

int getID(char);
char getSuit(int);

int main(void)
{
    int card[4][13];

    int i,j,num;

    for(i=0;i<4;i++)
    {
        for(j=0;j<13;j++)
        {
            card[i][j]=0;
        }
    }

    scanf("%d",&num);

    for(i=0;i<num;i++)
    {
        char suit;
        int id,rank;

        scanf(" %c",&suit);
        scanf("%d",%rank);

        id=getID(suit);

        card[id][rank-1]=1;
    }

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

    return 0;
}

int getID(char suit)
{
    int id;

    if(suit=='S') id=0;
    else if(suit=='H') id=1;
    else if(suit=='C') id=2;
    else id=3;

    return id;
}
char getSuit(int id)
{
    char suit;

    if(id==0) suit='S';
    else if(id==1) suit='H';
    else if(id==2) suit='C';
    else suit='D';

    return suit;
}