import Control.Monad
import Data.List
main = do
    n <- readLn
    cards <- replicateM n getLine
    putAnswer cards

putAnswer :: [String] -> IO ()
putAnswer cards
    | length cards == 52 = putStr ""
    | otherwise = putStrLn $ intercalate "\n" $ fullCards \\ cards

fullCards :: [String]
fullCards = (minorArcana 'S') ++ (minorArcana 'H') ++ (minorArcana 'C') ++ (minorArcana 'D')

minorArcana :: Char -> [String]
minorArcana arcana = do 
    let s = map show [1..13]
    map ((++) ([arcana] ++ " ")) s