import Data.List ((\\))

card = [[a,n]| a <- ["S","H","C","D"],n <- map show [1..13] ]

main = do
  s' <- getContents
  let s = tail $ map words $ lines s'
  putStr $ unlines $ map unwords $ (card \\ s)