n = gets.to_i
card = Array.new(13*4,0)

n.times do
  inp = gets.split(" ")
  i = inp[0].tr("SHCD","0123").to_i
  j = inp[1].to_i - 1
  card[i*13+j] = 1
end

0.upto(13*4-1) do |i|
  if(card[i] == 0) then
    type = (i / 13).to_s.tr("0123","SHCD")
    num = i % 13 + 1
    printf "%s %d\n", type, num
  end
end