Python ascii maze solver