import Control.Applicative
import Data.List

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