import Control.Applicative
import Control.Monad
import Data.Set

suitToNum (x:_:xs) =
    suit * 13 + read xs - 1
    where suit = case x of
                'S' -> 0
                'H' -> 1
                'C' -> 2
                'D' -> 3

numToSuit x =
    suit ++ show (num)
    where num = x `mod` 13 + 1
          suit = "SHCD"!!(x `div` 13) : " "
             

main = do
    n <- readLn
    ss <- replicateM n ( suitToNum <$> getLine )
    let lostcards = (fromAscList [0..51]) `difference` (fromList ss)
    putStr $ concat[numToSuit x ++"\n" | x <- toAscList lostcards]