Are masculinity and femininity innate or learnt behaviors? Or both ?

If a motherless girl is raised by a masculine father , will she be more masculine or feminine ?

If a fatherless boy is raised by a feminine mother, will he be more masculine or feminine ?