Linear and nonlinear models of heredity for blood groups and rhesus factor