#include<stdio.h>
int main(){
int i,j, n, t, no, cards[4][14];// = { 0 };
int mark;// char mark;
char *txt[4]={"S","H","C","D"};

for(i=0;i<4;++i)//
for(j=0;j<14;++j)//
card[i][j]=0;//

scanf("%d", &n);
for(i = 0;i < n;++i)// i <= n; i++) //????????????????????????
{


scanf("%c%d", &mark, &no);
t = no;// -1;
switch(mark)
{
case 'S' : cards[0][t]=1; break;
case 'H' : cards[1][t]=1; break;
case 'C' : cards[2][t]=1; break;
case 'D' : cards[3][t]=1; break;
}
}

for(j=0;j<4;++j)
{
for(i = 0; i < 14; i++) //Spade
{
if((cards[j][i]) == 0)
{
printf("%s %d\n",txt[j],(i));
}
}
}
return 0;
}