# S H C D

ary = Array.new(52)
n = gets.chomp.to_i
# for i in 0..52 do
#   ary[i] = false
# end
for i in 0..n do
  if i != 0

    str = gets.chomp.split(" ")
    case str[0]
    when "S"
      ary[0  + str[1].to_i] = true
    when "H"
      ary[13 + str[1].to_i] = true
    when "C"
      ary[26 + str[1].to_i] = true
    when "D"
      ary[39 + str[1].to_i] = true
    end
  end
end

for i in 1..52 do
  if  ary[i] != true

    case ( (i - 1) / 13)
    when 0
      puts "S " + (i).to_s
    when 1
      puts "H " + (i - 13).to_s
    when 2
      puts "C " + (i - 26).to_s
    when 3
      puts "D " + (i - 39).to_s
    end
  end
end
