def read_inputs
  n = gets.to_i
  (1..n).map {gets.chomp}
end

def full_cards
  full_cards = []
  ["S", "H", "C", "D"].each {|mark|
    (1..13).each {|number|
      full_cards << "#{mark} #{number}"
    }
  }
  full_cards
end

cards = read_inputs
puts (full_cards - cards).join("\n")