import Control.Applicative
import Data.List

main :: IO ()
main = do
  n  <- getLine
  xs <- lines <$> getContents
  let cards = [x ++ " " ++ (show n) | x <- ["S", "H", "C", "D"], n <- [1 .. 13]]
  putStr . unlines $ filter (`notElem` xs) cards

