n=gets.chomp.to_i

origin = []
["S","H","C","D"].each do |m|
    1.upto 13 do |n|
        origin << m + " #{n}"
    end
end

while card = gets
    if origin.include?(card.chomp)
        origin.delete(card.chomp)
    end
end

origin.each do |c|
    puts c
end