s = Array.new(13, 0)
h = Array.new(13, 0)
c = Array.new(13, 0)
d = Array.new(13, 0)

gets.chomp.to_i.times do
  suit,num = gets.chomp.split
  num = num.to_i

  case suit
  when "s" 
    s[num-1] = 1 
  when "h" 
    h[num-1] = 1 
  when "c" 
    c[num-1] = 1 
  when "d" 
    d[num-1] = 1 
  end 

end

s.each_with_index { |item, index| print "s #{index+1}\n" if item == 0 } 
h.each_with_index { |item, index| print "h #{index+1}\n" if item == 0 }
c.each_with_index { |item, index| print "c #{index+1}\n" if item == 0 }
d.each_with_index { |item, index| print "d #{index+1}\n" if item == 0 }


                                                            