The Impact of External and Internal Factors on the Formation of Personality