Oh boy, something went very wrong, this design of the cave should never happened :(
If you want still to keep try the game, I'm gonna tell you a secret, in the map, press 10 times the "L" key, after that, whenever you get stuck in the dungeon just press "N" to jump to next floor.