suits = [ 'S', 'H', 'C', 'D' ]
cards = []
suits.each { |shcd|
	for i in ( 1 .. 13 )
		cards.push( sprintf( "%s %d", shcd, i ) )
	end
}

n = gets.to_i
for i in ( 0 ... n )
	pattern, num = gets.split( " " )
	cards.delete( sprintf( "%s %s", pattern, num ) )
end

cards.each { |card|
	print( "#{card}\n" )
}