def Suit2Num(s)
  return 0 if s == "S"
  return 1 if s == "H"
  return 2 if s == "C"
  return 3 if s == "D"
  nil
end
def Num2Suit(n)
  return "S" if n == 0
  return "H" if n == 1
  return "C" if n == 2
  return "D" if n == 3
  nil
end

s = Array.new(4)
4.times { |i| s[i] = Array.new(13) }

n = gets.to_i
n.times {
  cs,cr = gets.chomp.split(" ")
  s[Suit(cs)][cr.to_i-1] = "Exsit"
}

4.times { |i|
  13.times { |j|
    puts "#{Num2Suit(i)} #{j+1}" if s[i][j] != "Exist"
  }
}