It’s true, nice people finish last. Studies on engineers, medical students, and salespeople revealed those who gave more favors than received ranked lowest in productivity, test scores, and sales revenue.

But, there’s a twist.

When looking at the best performers, it was the same type of people, with a high drive to benefit others, who were most successful.

Nice people finished last, but also finished first. The million dollar question—what’s the difference maker?

The first step is understanding reciprocity styles.

Professor Adam Grant explains that we fall into three major categories of social interaction:

Takers: try to gain as much as possible, yet contribute as little as possible. Matchers: seek a balanced exchange. You scratch my back, I’ll scratch yours. Givers: contribute more than gain; help others independent of reward.

Matchers make up the majority of the field, and play a crucial role in the rise of givers and the fall of takers. Grant explains:

“A matcher is somebody who really believes in a just world. Of course, a taker violates that belief in a just world. Matchers cannot stand to see takers get ahead by taking advantage of other people. The data on this suggests that matchers will often go around trying to punish them, often by gossiping and spreading negative reputational information.”

Remember, “givers” dominated both ends of the spectrum, here are three key aspects setting apart the ones who finished first and last:

1. Lack of assertiveness

If you’re being extremely timid when communicating, you’ll be taken advantage of and end up sacrificing your values and expectations.

Assertiveness is boosted when seeing your decisions in a broader context—the effects on your family, friends, or colleagues for example. Harvard professor Hannah Riley Bowles explains that people became more assertive in negotiations when also representing the interests of others. An approach known as a “think personally, act communally.”

See your actions beyond a vacuum. “Acting as an agent” on others behalf allows a generous person to stand their ground.

2. Having no boundaries

Givers who burn-out simply can’t say “No,” and have their work plagued by interruption. The major issue and solution is not in how much you give, but in when you give.

A Fortune 500 company realized their poor productivity was because they had no distinction between collaborative work and individual work. Their open work space was conducive for interaction, but detrimental for uninterrupted work. Once they readjusted and made specific times for helping one another, productivity levels drastically improved.

Intentionally carving out blocks of time to interact with your colleagues, offer mentoring, to network and make introductions is the difference between the top and bottom of givers. They may not keep measures on how much they gain, but they keep measures on when they give.

3. Using perspective and empathy

Successful givers ‘read’ others cognitively and emotionally. This social awareness is key to avoid being exploited.

A study involving three universities assigned roles of “empathizers” and “perspective-takers” in interactions. Empathizers imagined what the other person was feeling; perspective takers imagined what the other was thinking. The best outcomes occurred when one person was able to intuit and match the other’s interaction style.

Researchers stated, “Success in strategic social interactions often necessitates an understanding of the underlying motives, feelings and likely behaviors of one’s opponent.”

Successful givers—nice people who finished first—were selfless givers, but not self-sacrificing givers. By using these strategies, you’ll steer clear of the takers in life, and avoid being the doormat.