Generate every mazes of a given n*m size