import Data.List ((\\))

allcards :: [([Char], Integer)]
allcards = concat $ map cards ["S","H","C","D"]
             where
               cards s = zip (repeat s) [1..13]


tupleToString :: ([Char], Integer) -> String
tupleToString (s,n) = s ++ " " ++ show n

allcardsList :: [String]
allcardsList = map tupleToString allcards

main = do
  s' <- getContents
  let s = tail $ lines s'
  putStrLn $ unlines $ allcardsList \\ s