main = do
    let deck = [x ++ " " ++ (show y) | x <- ["S","H","C","D"], y <- [1..13]]
    n <- getLine
    ss <- getContents
    let cards = lines ss
    let remaining = removeC deck cards
    mapM_ putStrLn remaining


removeC deck [] = deck
removeC deck (x:xs) = removeC (filter (/=x) deck) xs
