They say everyone has a price, and it looks like this is true for even the most innocent among us.

Researchers from Yale University found that children as young as 12 months will usually take a smaller offering from a good person over a larger one from someone they see as a wrongdoer. This sense of morality has its limits, however — children are more willing to do business with bad guys who offer significantly more than the Good Samaritans.

“It’s a study I like to call ‘the deal with the devil,’” said Aber Tasimi, a grad student in the Department of Psychology who led the study alongside Yale psychologist Karen Wynn, in a statement.

The experiment’s first premise was simple: If children and babies are presented with a choice between a smaller and larger offering, which do they choose? To no one’s surprise, the kids almost always take the larger amount. The researchers wanted to know if it mattered who was giving them the goods, though.

In one experiment, the team introduced 5- and 8-year-olds to two characters — one described as nice, and the other mean. The researchers then told the children that the mean person was offering them either two, four, eight, or 16 more stickers than the nice character, who was only offering one. When the difference between the offerings was relatively modest, kids were more willing to reject the better offer and do their dealing with the nice person. When the offer climbed to 16 stickers, though, most children sold out to the mean character.

Even the youngest children, at 1 year old, seemed to face a moral dilemma. The researchers showed babies a puppet show with a puppet trying and failing to open a box with a toy inside. Then, during alternating trials, they introduced one puppet who helped open the box and another who slammed it shut. After the show, the nice puppet offered the child one cracker and the mean puppet offered two. In what the researchers saw as a remarkable showing of morality, 80 percent of the babies took the single cracker from the nice puppet. But like their older peers, babies switched sides when the stakes were raised: When the mean puppet started offering eight crackers, babies showed a greater willingness to do business with him.

“When I tell people about these findings, they often joke that babies and kids are sellouts, but I think the message is less cynical,” Tasimi said. “Even early on, we’re willing to pay personal costs to avoid wrongdoers in favor of do-gooders.”

Some of the kids rejected any amount from bad guys, something Tasimi saw as a good start for future studies.

“I think an exciting avenue for future research involves understanding how individual differences, even during the first few months of life, influence our judgements of good and bad, right and wrong,” he said.

Source: Tasimi A, Wynn K. Costly rejection of wrongdoers by infants and children. Cognition. 2016.