SRM 159 DIV2 
added 3 specific case
S-S
S-B
S--B 

but it does not work