Male Sex Hormone testosterone
In dogs, there are additional influences on behavior: where a pup finds itself positioned in the womb and who its neighbors are.
Pups in the middle of each horn of the uterus are likely to receive the best nutrition. More interesting is the influence of a hormone produced by male pups while still in the womb.
As a male pup's restes develop, they secrete bursts of the male sex hormone testosterone; the hormone travels to the developing brain, where it helps to forge connections that mold future male sexual characteristics such as dominance.
Some researchers believe that female fetuses lying between two males are exposed to tiny amounts of male hormone, and as a result they are predisposed to develop a slightly masculinized brain and consequently a more dominant personality.