<?php
function input_explode(){
return explode(" ",trim(fgets(STDIN)));
}
function tramp_cardset(){
return array(
"S"=>array_fill(1,13,null),
"H"=>array_fill(1,13,null),
"C"=>array_fill(1,13,null),
"D"=>array_fill(1,13,null),
);
}
$num=trim(fgets(STDIN));
$tramp_check=tramp_cardset();
for($i=0;$i<$num;$i++){
list($suit,$rank)=input_explode();
$tramp_check[$suit][$rank]="check";
}
foreach($tramp_check as $key=>$value){
for($i=1;$i<=13;$i++){
if(!isset($tramp_check[$key][$i])){
echo"$key"." ".$i.PHP_EOL;
}
}
}echo PHP_EOL;
?>