which principle explains how genes are inherited from parents of to offspring​