my take on Knight's Travails problem