deck = {}
%w(S H C D).each do |suit|
    deck[suit] = [*1..13]
end

_ = gets
ARGF.each_line do |line|
  suit, num = line.split
  deck[suit].delete(num.to_i)
end

deck.each do |suit, nums|
  nums.each do |num|
    puts "#{suit} #{num}"
  end
end