symbols = ["S", "H", "C", "D"]
n = gets.chomp.to_i

cards = []
n.times do
  cards << gets.chomp
end

symbols.each do |x|
for i in 1..13 do
  y = "#{x} #{i}"
    puts y unless cards.include?(y)
  end
end