n = gets.to_i
list = {}
n.times{ |i|
    str = gets.chomp
    list[str] = 1
}
for i in ["S","H","C","D"] do
    for j in 1..13 do
        str =  i + " " + j.to_s
        if  !list.include?(str)
            puts str
        end
    end
end