trump = Array.new

for mark_order in 0...4 do
  mark = begin
    case mark_order
    when 0; "S"
    when 1; "H"
    when 2; "C"
    when 3; "D"
    end
  end
  for n in 1..13 do
    trump << "#{mark} #{n}"
  end
end

cards_num = gets.to_i

cards_num.times do
  card = gets.to_s
  trump.delete("#{card.chop}")
end

puts trump