num = gets.to_i

a = Hash.new()
num.times do |i|
    a[gets.chomp] = true
end

["S", "H", "C", "D"].each do |m|
    (1..13).each do |i|
        if !a[m + " " + i.to_s] then
            STDOUT << m << " " << i << "\n"
        end
    end
end

