size = gets.to_i
d_array = Array.new(13.0)
h_array = Array.new(13.0)
s_array = Array.new(13.0)
c_array = Array.new(13.0)

size.times do
    c, n = gets.split
	if c == "D" then
		d_array[n.to_i-1] = 1
	elsif c == "H" then
		h_array[n.to_i-1] = 1
	elsif c == "S" then
		s_array[n.to_i-1] = 1
	elsif c == "C" then
		c_array[n.to_i-1] = 1
	end
end
0.upto(12) {|i| puts"S #{i+1}" if s_array[i] == nil}
0.upto(12) {|i| puts"H #{i+1}" if h_array[i] == nil}
0.upto(12) {|i| puts"C #{i+1}" if c_array[i] == nil}
0.upto(12) {|i| puts"D #{i+1}" if d_array[i] == nil}
