It's "put oneself in someone's shoes". Do not judge the person harshly, because you would do what they have done if the same thing was happening to you.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.