#include <stdio.h>

int main(void){
    char tem[5]={"SHDC"};
    int tranp [4][13]; // 0S 1H 2D 3C
    int n,i,j;

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

    scanf("%d",&n);

    for(i=0;i<n;i++){
     char mark;
     int number;
     scanf("%c %d",&mark,&number);
     if( mark =='S')
        tranp[0][number-1] = 1;
     else if( mark =='H')
        tranp[1][number-1] = 1;
     else if( mark =='D')
        tranp[2][number-1] = 1;
     else( mark =='C')
        tranp[3][number-1] = 1;
     }
       
     for(i=0;i<4;i++){
     for(j=0;j<13;j++){
      if( tranp[i][j] == 0){
        printf("%c %d",tem[i],j+1);
      }
     }
    }
   return 0;
}

    