a = []
13.times do |i|
  a << ["S", i+1]
end
13.times do |i|
  a << ["H", i+1]
end
13.times do |i|
  a << ["C", i+1]
end
13.times do |i|
  a << ["D", i+1]
end

n = gets.to_i
n.times do
  h = gets.split
  h[1]=h[1].to_i
  a.delete(h) if a.include?(h)
end
a.size.times do |i|
  puts "#{a[i][0]} #{a[i][1]}"
end
