mark = ['S', 'H', 'C', 'D']
n = STDIN.gets.to_i
cards = {}
for i in 0 .. 3 do
  for j in 1 .. 13 do
    cards.store(mark[i] + " " + j.to_s, true)
  end
end

for i in 1 .. n do
  input = STDIN.gets
  input.chomp!
  if cards.has_key?(input)
    cards[input] = false
  end
end

cards.each{|key, value|
  if value
    print key + "\n"
  end
}