c = ["S", "H", "C", "D"]
h = Hash.new { |hash,key| hash[key] = Hash.new {} }
n = gets.to_i
for i in 1..n do
	a, b = gets.split
	h["#{a}"]["#{b}"] = true
end
for k in 0..3 do
	for i in 1..13 do
		puts "#{c[k]} #{i}" if h["#{c[k]}"]["#{i}"] != true
	end
end