suits = ['S', 'H', 'C', 'D']
nums = 1..13
cards = suits.product(nums.to_a.map {|i| i.to_s})

num_of_cards = $stdin.readline.to_i
(1..num_of_cards).each do |i|
  card = $stdin.readline.split(" ")

  cards.delete(card)
end

cards.each do |card|
  puts card.join(" ")
end

