#include<stdio.h>
int main(void){
int i,j,k,n,num,card[4][13];
char mark;
for(i=0;i < 4;i++){
for(j=0;j < 13;j++){
card[i][j]=0;
}
}
scanf("%d",&n);
for(i=0;i < n;i++){
scanf("%c %d",&mark ,&num);
switch(mark){
case 'S':
card[0][num]=1;
break;
case 'H':
card[1][num]=1;
break;
case 'C':
card[2][num]=1;
break;
case 'D':
card[3][num]=1;
break;
}
}
for(i=0;i < 4;i++){
for(j=0;j < 13;j++){
if (card[i][j] == 0){
k =j++;
switch(i){
case 0:
printf("S %d\n",k);
break;
case 1:
printf("H %d\n",k);
break;
case 2:
printf("C %d\n",k);
break;
case 3:
printf("D %d\n",k);
break;
}
}
}
return 0;
}