class Deck
  Suits = %w(S H C D)

  def initialize
    @cards = []
    Suits.each do |suit|
      (1..13).each do |rank|
        @cards << "#{suit} #{rank}"
      end
    end
  end

  def open
    puts @cards
  end

  def delete(suit, rank)
    @cards.delete("#{suit} #{rank}")
  end
end

deck = Deck.new

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

deck.open