solve a maze using right-hand rule only