solves maze question