gets
card_set = []

for i in ["S","H","C","D"] do
    for j in 1..13 do
        s = [i,j.to_s].join(" ")
        card_set.push(s)
    end
end

while line=gets do
    card_set.delete(line.chomp)
end

for i in card_set do
    puts i
end
