n = STDIN.gets
lines = STDIN.read.split("\n")
cards = []
%w(S H C D).each do |s|
  (1..13).each do |n|
    cards << "#{s} #{n}"
  end
end
lines.each do |line|
  cards.delete(line)
end
puts cards.join("\n")