system
Given the following post, respond as if you're commenting on Reddit:
human
When a baby is born is it born with all the gut flora it needs? If not how does it accumulate all those bacteria?
gpt
A fetus in the womb is generally sterile. It has developed entirely inside a sealed environment, the amniotic sac, so there's nothing in the gut except its own cells. Once that sac ruptures, colonization happens quite rapidly. 

An infant born vaginally will pick up some of its mother's bacteria on its way through the birth canal. An infant born by C-section will pick up bacteria from the air and the environment. Either way, the upper GI tract is inoculated either during birth or within moments afterward.

The actual growth and establishment of bacterial populations takes longer. At first it is the least "picky" bacteria, like *E. coli*, that multiply the fastest. Those dominate for a few days. But as those strains become very numerous, they change the environment inside the gut (removing oxygen, for instance) allowing other species to begin taking hold. Those bacteria further alter the environment, again changing which species can thrive, and so on.

This feedback cycle happens several times before the bacterial makeup settles. In an infant born vaginally, it takes about a month for the flora to be really well established. In one born by C-section, because the initial species mix differs, it may take up to six months.