##### Warning: through inspection, it appears that the ##### following code may fail under these circumstances: # A) ..... # B) ..... # C) ..... ##### A possible solution is in the following (untested) ##### code: # ......... # .........