#include <math.h>
#include <iostream>
#include <string.h>
int main(){
int i = 0;
std::cin >> i;

char type;
int num = 0;
int c =0;
bool card[52]={};
for(int n = 0;n<52;n++)card[n]= false;
for (int n = 0;n < i;n++){
std::cin >> type >> num;
int t;
if(strcmp(const_cast<char*>(type),"S")==0)t=0;
if(strcmp(const_cast<char*>(type),"D")==0)t=1;
if(strcmp(const_cast<char*>(type),"C")==0)t=2;
if(strcmp(const_cast<char*>(type),"H")==0)t=3;

card[t*13+num] = true; 

}
for(int n = 0;n<52;n++){

if(card[n]== false){
int t = floor(n/13);
if(t == 0)std::sin << "S" << n%13;
if(t == 1)std::sin << "D" << n%13;
if(t == 2)std::sin << "C" << n%13;
if(t == 3)std::sin << "H" << n%13;

}

}
return 0;
}