temp_S = [1,2,3,4,5,6,7,8,9,10,11,12,13]
temp_H = [1,2,3,4,5,6,7,8,9,10,11,12,13]
temp_C = [1,2,3,4,5,6,7,8,9,10,11,12,13]
temp_D = [1,2,3,4,5,6,7,8,9,10,11,12,13]

n = gets.chomp.to_i #???????????????????????????????????°
str = gets.chomp.split(" ")
while true do
	break if str != []
	case str[0]
	when "S"
		temp_S.delete(str[1].to_i)
	when "H"
		temp_H.delete(str[1].to_i)
	when "C"
		temp_C.delete(str[1].to_i)
	when "D"
		temp_D.delete(str[1].to_i)
	else
	end
	str = gets.chomp.split(" ")
end

for n in 0...temp_S.size do
	puts "S " + temp_S[n].to_s
end
for n in 0...temp_H.size do
	puts "H " + temp_H[n].to_s
end
for n in 0...temp_C.size do
	puts "C " + temp_C[n].to_s
end
for n in 0...temp_D.size do
	puts "D " + temp_D[n].to_s
end