n = gets.strip().to_i
trump = {"S" => Array.new(13){0},
		 "H" => Array.new(13){0},
		 "C" => Array.new(13){0},
		 "D" => Array.new(13){0}}
n.times do
	inputs = gets.strip().split(" ")
	symbol = inputs[0]
	num = inputs[1].to_i
	trump[symbol][num-1] = 1
end

trump.each do |symbol, array|
	for i in 0..12
		puts "#{symbol} #{i+1}" if array[i] == 0
	end
end
