module Main where

import Data.Functor
import Data.List

main :: IO ()
main =  do
 { [n] <- getInts
 ; cs  <- loop n
 ; putStr $ unlines $ map show $ sort $ cards \\ cs
 }

loop :: Int -> IO [Card]
loop 0 = return []
loop m = do { c  <- read <$> getLine
            ; cs <- loop (m-1)
            ; return (c:cs)
            }

data Card = S Int | H Int | C Int | D Int deriving (Eq,Ord,Show,Read)

cards = [ c n | c <- [S,H,C,D], n <- [1..13]]

getInts :: IO [Int]
getInts = map read . words <$> getLine