def output(arr,s)
arr.each{|obj|
     printf("%s %d\n",s,obj)
}
end

arrs=Array[1,2,3,4,5,6,7,8,9,10,11,12,13]
arrh=Array.new(arrs)
arrc=Array.new(arrs)
arrd=Array.new(arrs)

n=gets.to_i
for i in 1..n do
s,m=gets.split(' ')
m=m.to_i
case s
when 'S' then
     arrs.delete(m)
when 'H' then
     arrh.delete(m)
when 'C' then
     arrc.delete(m)
when 'D' then
     arrd.delete(m)
end
end

output(arrs,'S')
output(arrh,'H')
output(arrc,'C')
output(arrd,'D')