If you play the game right, by the time you reach the end of the maze, you’ll have found all the pieces to build a staircase, in order to reach the exit door (but no instructions). 

If not, the door is up there, in the wall, and you’re down here, SOL.