<?php
$intLength = trim(fgets(STDIN));
for($first = 0; $first < $intLength; $first++){
    $giveCard[first] = trim(fgets(STDIN));
}
$mark = array("S ","H ","C ","D ");
$cardIndex = 0;
for($first = 0; $first < 4; $first++){
    for($second = 0; $second < 13; $second++){
        $hasCard[$cardIndex] = $mark[$first] + " " + $second;
        $cardIndex++;
    }
}
for($first = 0; $first < count($cardArr); $first++){
    for($second = 0; $second < $intLength; $second++){
        $hasCard = array_diff($giveCard, array($giveCard[$second]));
        $hasCard = array_values($hasCard);
    }
}
var_dump($hasCard);
?>

