ary = Array.new(4, Array.new(13,true))
n = gets.to_i
for i in 1..n
  s,r = gets.split
  k = r.to_i
  case s
  when "S"
    ary[0][k-1] = false
  when "H"
    ary[1][k-1] = false
  when "C"
    ary[2][k-1] = false
  when "D"
    ary[3][k-1] = false
  end
end
suit = ["S","H","C","D"]
for i in 0..3
  for j in 1..13
    puts suit[i] + " " j.to_s if ary[i][j-1]
  end
end