gets
s, h, c, h = [], [], [], []
ARGF.each_with_index do |line, i|
  s << line if line.include?("S")
  h << line if line.include?("H")
  c << line if line.include?("C")
  d << line if line.include?("D")
end
s.sort!
h.sort!
c.sort!
d.sort!
(1..13).each do |n|
  unless s.include?("S #{n}")
    puts "S #{n}"
  end
end
(1..13).each do |n|
  unless h.include?("H #{n}")
    puts "H #{n}"
  end
end
(1..13).each do |n|
  unless c.include?("C #{n}")
    puts "C #{n}"
  end
end
(1..13).each do |n|
  unless d.include?("D #{n}")
    puts "D #{n}"
  end
end