import Data.List ((\\))

data Card = Card Pict Int
          deriving Eq

data Pict = S | H | C | D
          deriving (Read, Show, Eq)

instance Show Card where
    show (Card p n) = show p ++ " " ++ show n

main :: IO ()
main = getLine >> getContents >>= mapM_ print . (allCards \\) . map toCard . lines

toCard :: String -> Card
toCard str = Card (read p :: Pict) (read n :: Int)
    where [p,n] = words str

allCards :: [Card]
allCards = zipWith Card picts nums
    where picts = concatMap (replicate 13) [S,H,C,D]
          nums  = take 52 $ cycle [1..13]