import Control.Applicative
import Control.Monad
import Data.List
main = do
  n<- (read::String->Int) <$> getLine
  ws <-  map readCard <$> (replicateM n getLine)
  putStr $ unlines $ map showCard (cards \\ ws)

readCard:: String -> (String, Int)
readCard c = (a, (read:: String->Int) b)
              where
                [a,b]= words c

showCard:: (String, Int) -> String
showCard (a,b) = a++ " "++(show b)

cards:: [(String,Int)]
cards=[(x,y) | x <- ["S","H","C","D"], y <- [1..13]]