import Data.List
main = interact $ unlines . map show' . missing_cards . map (read' . words) . tail . lines
 where
  read' [s,n] = (s, read n)
  show' (s,n) = s ++ " " ++ show n
missing_cards cards = [(s,n)| s<-["S","H","C","D"], n<-[1..13]] \\ cards