#!/usr/bin/env ruby

if __FILE__ == $0
	trump = Array.new
	['S', 'H', 'C', 'D'].each do |d|
		1.upto(13) do |r|
			trump += ['%c %d' % [d, r]]
		end
	end

	n = gets.chomp.to_i
	n.times do
		trump.delete(gets.chomp)
	end

	trump.each do |t|
		puts t
	end
end

