# puzzle gauntlet medium

Secret Santa Check

The Secret Santa list is out β€” but is it LEGAL? Every kid gives exactly one gift, every kid receives exactly one, and NOBODY gifts themselves. πŸŽ…

You get the kids and the assignments as giver:receiver pairs. Print valid or invalid.

Example:

Input: kids = ["mia", "leo", "kai"], assignments = ["mia:leo", "leo:kai", "kai:mia"] Output: valid

Nobody gifts themselves, and each kid gives exactly once and receives exactly once β€” a perfect cycle.

πŸ’‘ need a hint?

pg-secret-santa.pyπŸ”’ given lines are locked β€” write your code in between
loading...