include <iostream>
#include <cstdio>
int main(){
	int n,i;
	std::cin>>n;
	int a[n+1];
	char c[n+1];
	char S[14]={0},H[14]={0},C[14]={0},D[14]={0};
	for(i=0;i<n;i++){
		std::cin>>c[i]>>a[i];
	}
	for(i=0;i<n;i++){
		if(c[i]=='S')
			S[a[i]]=1;
		if(c[i]=='H')
			H[a[i]]=1;
		if(c[i]=='C')
			C[a[i]]=1;
		if(c[i]=='D')
			D[a[i]]=1;
	}
	for(i=1;i<=13;i++){
		if(S[i]==0)
			std::cout<< "S" << " "<<i<<std::endl;
	}
	for(i=1;i<=13;i++){
		if(H[i]==0)
			std::cout<< "H" << " "<<i<<std::endl;
	}
	for(i=1;i<=13;i++){
		if(C[i]==0)
			std::cout<< "C" << " "<<i<<std::endl;
	}
	for(i=1;i<=13;i++){
		if(D[i]==0)
			std::cout<< "D" << " "<<i<<std::endl;	
	}
	std::cout<<std::endl;
	return 0;
}