It feels like a decade has passed since I'd solved a good,tiring logical problem.I had come across this a number of times in the past two years but I felt like solving it today.So,here is the solution (in as much details as I could provide.)The probl