import Data.List
import Control.Applicative
import Control.Monad

main = do
    n <- readLn :: IO Int
    cards <- forM [1..n] $ \i -> do
                    c <- words <$> getLine
                    let cType = c !! 0
                        cNum  = read (c !! 1) :: Int
                    return $ Card cType cNum
    let diff = defaultCards \\ cards
    forM_ diff $ \c -> do
        putStrLn $ cardType c ++ " " ++ (show $ cardNum c)


data Card = Card { cardType :: String
                 , cardNum  :: Int
                 } deriving (Show, Eq)
type Cards = [Card]

defaultCards = [ Card "S" 1
               , Card "S" 2
               , Card "S" 3
               , Card "S" 4
               , Card "S" 5
               , Card "S" 6
               , Card "S" 7
               , Card "S" 8
               , Card "S" 9
               , Card "S" 10
               , Card "S" 11
               , Card "S" 12
               , Card "S" 13
               , Card "H" 1
               , Card "H" 2
               , Card "H" 3
               , Card "H" 4
               , Card "H" 5
               , Card "H" 6
               , Card "H" 7
               , Card "H" 8
               , Card "H" 9
               , Card "H" 10
               , Card "H" 11
               , Card "H" 12
               , Card "H" 13
               , Card "C" 1
               , Card "C" 2
               , Card "C" 3
               , Card "C" 4
               , Card "C" 5
               , Card "C" 6
               , Card "C" 7
               , Card "C" 8
               , Card "C" 9
               , Card "C" 10
               , Card "C" 11
               , Card "C" 12
               , Card "C" 13
               , Card "D" 1
               , Card "D" 2
               , Card "D" 3
               , Card "D" 4
               , Card "D" 5
               , Card "D" 6
               , Card "D" 7
               , Card "D" 8
               , Card "D" 9
               , Card "D" 10
               , Card "D" 11
               , Card "D" 12
               , Card "D" 13 ]