first working maze generator with output