transistor switch logic . very hard to solve this scenario.

OP PLEASE STOP CROSS-POSTING.
This wastes time.