
  cards = readlines.map(&:split)
  cards.shift

  m = ["S","H","C","D"]
  
  for im in 0..3
  S = []
  S = cards.select{|i| i[0] == m[im]}

    if S.size < 13

      for scard in 1..13

        an = false

        for ss in S
          an = true if scard == ss[1].chomp.to_i
        end

        unless an
          puts "#{m[im]} #{scard}"
        end

      end

    end
  end 

