cards = []
suits = ['S', 'H', 'C', 'D']
suits.each do |s|
  (1..13).each do |i|
    cards << "#{s} #{i}"
  end
end
input_cards = []
n = gets.chomp.to_i
n.times do
  input_cards << gets.chomp
end
puts cards - input_cards

