import Control.Applicative
import Data.List

main = do
    _ <- getLine
    cards <- lines <$> getContents
    putStr $ unlines ([m ++ " " ++ (show r) | m <- ["S", "H", "C", "D"], r <- [1 .. 13]] \\ cards)