s = [1,2,3,4,5,6,7,8,9,10,11,12,13]
h = [1,2,3,4,5,6,7,8,9,10,11,12,13]
c = [1,2,3,4,5,6,7,8,9,10,11,12,13]
d = [1,2,3,4,5,6,7,8,9,10,11,12,13]

n = gets.to_i

n.times do
 x = gets()
 y = x.split()
 a = y[0]
 b = y[1].to_i
 
 if a == "S"
  s.delete(b)
 elsif a == "H"
  h.delete(b)
 elsif a == "C"
  c.delete(b)
 else
  d.delete(b)
 end
end

i = 0
while i < s.length
  puts "S #{s[i]}"
  i += 1
end

i = 0
while i < h.length
  puts "H #{h[i]}"
  i += 1
end

i = 0
while i < c.length
  puts "C #{c[i]}"
  i += 1
end

i = 0
while i < d.length
  puts "D #{d[i]}"
  i += 1
end
