mark = ["S", "H", "C", "D"]

h = 0
n.times do
    num[h] = gets.chomp
    h += 1
end

4.times do
    13.times do
        card[i][j] = "#{mark[i]} #{j}"
        j += 1
    end
    i += 1
end

i = 0
j = 0
4.times do
    13.times do
        h.times do
            if num[k] != card[i][j] then
                puts "#{card[i][j]}"
            end
            k += 1
        end
        j += 1
    end
    i += 1
end