class Card
  def initialize
    # @cards = []
    @cards = %w(S H C D).each do |mark|
      (1..13).each do |rank|
        @cards << "#{mark} #{rank}"
      end
    end
  end

  def delete(mark=nil, rank=nil)
    @cards.delete("#{mark} #{rank}")
  end

  def open
    puts @cards
  end
end

cards = Card.new
gets
ARGF.each_line do |line|
  # m = line.chomp
  # p m
  mark, rank = line.chomp.split
  cards.delete(mark, rank)
end

cards.open