Scramble
Upon falling into deep water or lava, your character will attempt to scramble to safety. This will succeed if you are carrying a sufficiently light load (a random percentage of your max capacity between 50% and 100%), are adjacent to shallow water or dry land, and are not in Statue Form. Bear in mind that falling in lava will kill you outright unless you have at least one rank of fire resistance, and even then you'll still take heavy fire damage (10+2d50/(level of fire resistance)) and may lose scrolls.
While this is by no means a terribly good idea, the fact that you will always scramble so long as your load is sufficiently light makes it possible to use scrambling as a means to cross a single tile of deep water or lava you otherwise couldn't. Simply make sure you are below 50% carrying capacity, confuse yourself, blunder into the deadly terrain, and hope the RNG decides to scramble you out on the desired side. There are all sorts of reasons why this is less than ideal, particularly when lava is involved, but it can allow you to reach early areas you would otherwise need to fly to reach.