import std.stdio,std.string,std.conv,std.array,std.algorithm;
void main(){
	int[string] mark;
	mark["S"]=0;
	mark["H"]=1;
	mark["C"]=2;
	mark["D"]=3;
	bool[13][4] card;
	readln();
	for(;;){
		auto rcs = readln().chomp().split();
		if(!rcs){break;}
		card[mark[rcs[0]]][to!int(rcs[1])-1]=true;
	}
	foreach(m;0..4){foreach(n;0..13){
		if(!card[m][n]){
			final switch(m){
			case 0:write("S ");break;
			case 1:write("H ");break;
			case 2:write("C ");break;
			case 3:write("D ");break;
			}
			writeln(n+1);
		}
	}}
}