If you are a lucky species, you will stumble into random gene mutations that just happen to help you survive better - allowing you and your descendants to keep and build on the helpful traits they encode. As with anything involving luck, the more chances you take, the more chances you have of hitting the jackpot.
That's what seems to have happened with our long-ago ancestors - the ones we share with still living lungfish. They struck enough genetic jackpots to allow them to climb out of the water and access the whole new world of land, around 420 million years ago.
In doing so, they became the ancestors of all land animals with backbones (tetrapods). Having a massive genome, like that found in modern lungfish, may have helped with this.
Researchers just sequenced the entire genome of the endangered Australian lungfish (Neoceratodus forsteri), which has the largest known animal genome. It is 14 times the size of ours.
This required new DNA sequencing techniques and masses of computing power, only now technically possible - to piece together a whopping 43 billion nucleotides ('letters' in the genetic code).
"When you look at it from a genomic perspective, [lungfish are] genomically halfway between a fish and a land-based vertebrate," biologist Siegfried Schloissnig from the Research Institute of Molecular Pathology (IMP) in Austria told New Scientist.
Of six still living species of lungfish, four are African, one South American, and one Australian. They first appeared in the fossil record 400 million years ago.
The Australian species has retained the most ancestral features, and was mistakenly classed as an amphibian when first discovered, due to its bizarre mix of fish and newt features, including its weird, leg-like lobed fins. These strange in-between 'living fossils' can live up to 100 years.
Australian lungfish still appear to closely resemble the fossils of their 100-million-year-old (and now extinct) ancestral species that hauled themselves out of the water, eventually spawning mammals, birds, reptiles, and amphibians.
Its genome confirms that this air-gulping swimmer is our closest living fish relative, beating the other contender, coelacanths - another group of lobed finned fish.
So within the Australian lungfish's giant haystack of genes are clues to how animals made the transition from aquatic to terrestrial.
"This… required a number of evolutionary innovations including airbreathing, limbs, posture, prevention of desiccation, nitrogen excretion, reproduction, and olfaction," the researchers write in their paper.
They identified the same genes responsible for our embryonic lung development already present in the lungfish, as are our familiar ulna and radius arm bones, and the genes that encode them. Tetrapod limb patterning genes like hox-c13 and sal1 had never been seen before in fish.
"Such novelties might have predisposed the [lobe-finned fish] to conquer land demonstrating how the lungfish genome can contribute to better understanding of this major transition during vertebrate evolution," the team write.
The researchers also found huge additions to the lungfish's genes associated with smell - what would have been a new suite of sensors suitable to their ancestors' new environment. These genes code for receptors of airborne odours, while groups of receptors for waterborne scents shrunk.
Many of the excess genes that bulk out their hefty genome arose through copied sections of their DNA. Some of the lungfish's individual chromosomes contain as many nucleotides as our entire human genome.
This form of genome expansion, through copies, is known to be an important driving force of evolution, with evidence that it helps provide organisms with the ability to rapidly adapt to a changing environment.
The Australian lungfish is an incredible living record of our evolution, and after preserving this genetic history for so long, it's now under threat by human activities altering the freshwater habitats it calls home.
The animal hunts for frogs, worms and snails, as well as munching on plants in the water. It usually relies on gills to breathe, but its single lung allows the lungfish to surface for fresh air when dry conditions reduce their watery environment, making it murky and stagnant.
"There is no doubt that the newly sequenced genome will unveil more of the secrets of this bizarre vertebrate in the future," said IMP cellular geneticist Elly Tanaka.
"Not only can it teach us things about adaptations to life on land, but it may also explain how certain genomes evolve to be so big."
This research was published in Nature.