Klein studied with both Ferenczi and Abraham in the 1920s, and she was deeply influenced by their ideas. Abraham was one of the pioneers of psychoanalytic theory, and his work on the development of the ego and the relationship between anxiety and defense mechanisms helped shape Klein's thinking about the internal world of the child. However, Klein's relationship with Abraham was somewhat strained, and they had fundamental disagreements about the nature of the psychoanalytic process and the interpretation of clinical material.
In contrast, Klein had a close and intense relationship with Ferenczi, who she saw as a mentor and friend. Ferenczi's ideas about the importance of the analyst's empathy and responsiveness to the patient's needs, as well as his emphasis on the role of early relationships in shaping the development of the self, were particularly influential on Klein's work. She also drew heavily on Ferenczi's ideas about the role of play in psychoanalysis, which she used to develop her own technique of play therapy with children.
Overall, while both Ferenczi and Abraham were important figures in Klein's development as a psychoanalyst, it is generally thought that Ferenczi had a more significant impact on her thinking and the evolution of her ideas about the nature of the psyche and the psychoanalytic process.