card = []
mk = ["S", "H", "C", "D"]
num = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]

for i in(0..3)
    for k in(0..12)
        card << mk[i] + " " + num[k].to_s
    end
end

n = gets.to_i
n.times do
    card.delete(gets.chomp)
end
    
puts card