#52????????????????????????
ary = Array.new
mark = Array.new(["S", "H", "C", "D"])

for i in 0..3
	arytemp = Array.new(13) {|j| "#{mark[i]} #{j+1}" }
	ary = ary + arytemp
end


#gets????????????????????????
arygets = Array.new

for k in 1..gets.to_i
	arygets << gets.chomp
end

puts ary - arygets