n = gets.to_i
cards = {}
n.times do
  cards[gets.chomp] = 1
end

for m in ["S", "H", "C", "D"] do
  for i in 1..13 do
    card = m + " " + i.to_s
    if !cards.has_key?(card) then
      puts card
    end
  end
end

