marks = ["S", "H", "D", "C"]
cards = []
marks.each do |m|
  (1..12).each do |n|
    cards << m + "\s" + n.to_s
  end
end

ARGF.each_line do |line|
  next unless marks.include?(line[0])
  d_line = line.chomp
  cards.delete(d_line)
end

cards.each do |card|
  puts card
end