#include<stdlib.h>

int main(){
 int n,i,X[53],B;
 char A;
 X[0]=0;
 for(i=1;i<=52;i++){
  X[i]=1;}
 scanf("%d",&n);
 for(i=1;i<=n;i++){
  scanf("%c %d",&A,&B);
  if(A=='H'){
   B=B+13;}
  if(A=='C'){
   B=B+26;}
  if(A=='D'){
   B=B+39;}
  X[B]=0;}
 for(i=1;i<=52;i++){
  if(X[i]=1){
   if((i-1)/13==0){
    printf("S %d",i);}
   if((i-1)/13==1){
    printf("H %d",i-13);}
   if((i-1)/13==2){
    printf("C %d",i-26);}
   if((i-1)/13==3){
    printf("D %d",i-39);}}}
  printf("\n");
  return 0;}