# ITP1_6_B_0001

all = Array.new
mark = [ "S" , "H" , "C" , "D" ]
i1 = 1
sample = Array.new
i2 = 0

mark.each do
	13.times do
		all << [ "#{mark}" , i1.to_s ]
		i1 += 1
	end
end

n = gets.to_i

n.times do
	sample << gets.split.map
end

outdata = all - sample

outdata.each do
	puts outdata[i2].join(" ")
	i2 += 1
end