##S->H->C->D
$array=Array.new(4).map{Array.new(14, 0)}
$suits=["S","H","C","D"]
N=gets.to_i
i=0
def suit(str)
 if(str=="S")
  return 0
 elsif(str=="H")
  return 1
 elsif(str=="C")
  return 2
 else
  return 3
end
end
while(i<N)
s,a=gets.chomp.split(" ").map(&:to_s);
 $array[suit(s)][a.to_i]=1
i=i+1
end
for m in 0..3 do
 for n in 1..13 do
  if$array[m][n]==0
   print("#{$suits[m]} #{n}\n")
  end
 end
end
