#include <stdio.h>

int main(void){

int a,b,c;
int S[13],H[13],C[13],D[13];
char c;

for(b=0;b<=12;b++){
S[b]=b+1;
H[b]=b+1;
C[b]=b+1;
D[b]=b+1;
}
//#########################
scanf("%d",&c);
//#########################
for(b=0;b<c;b++){
scanf("%c %d",&c,&a);

if(c=='S'){
S[a-1]=0;
}
if(c=='H'){
H[a-1]=0;
}
if(c=='C'){
C[a-1]=0;
}
if(c=='D'){
D[a-1]=0;
}
}
//########################
for(b=0;b<13;b++){
if(!(S[b]==0)){
printf("S %d\n",S[b]);
}
}
for(b=0;b<13;b++){
if(!(H[b]==0)){
printf("H %d\n",H[b]);
}
}
for(b=0;b<13;b++){
if(!(C[b]==0)){
printf("C %d\n",C[b]);
}
}
for(b=0;b<13;b++){
if(!(D[b]==0)){
printf("D %d\n",D[b]);
}
}

return 0;