memo = {"S"=>[],"H"=>[],"C"=>[],"D"=>[]}
gets.chomp.to_i.times do
  k, n = gets.chomp.split
  memo[k] << n
end

all = (1..13).map(&:to_s)
memo.each{|k, ns| all.each{|n| puts "#{k} #{n}" if !ns.include?(n)}}
