symbols = ['S', 'H', 'C', 'D']

n = gets.chomp.to_i

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

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