import Control.Monad
import Control.Applicative

data Card = S Int | H Int | C Int | D Int deriving (Show, Eq, Ord)

readCards :: IO [Card]
readCards =
    map rd . lines <$> getContents 
    where
    rd :: String -> Card
    rd l =
        case (words l) of
            ["S", n] -> S (read n)
            ["H", n] -> H (read n)
            ["C", n] -> C (read n)
            ["D", n] -> D (read n)
            _ -> undefined

main = do
    _ <- getLine
    cards <- readCards
    let suit = concat [map f [1..13] | f<-[S,H,C,D]]
    mapM_ print (suit \\ cards)