num = gets.to_i
s = 0
array = []
while s <= 12
 s += 1
 array << ("S #{s.to_s}")
 end
h = 0
while h <= 12
  h += 1
  array << ("H #{h.to_s}")
end
c = 0
while c <= 12
   c += 1
   array << ("C #{c.to_s}")
end
d = 0
while d <= 12
    d += 1
    array << ("D #{d.to_s}")
end
times = 1
while times <= num
  times += 1
  deleat = gets.chomp.to_s
  array.delete(deleat)
end
p array