This was a SAS job to run through a spreadsheet of people and addresses and a preference of how many valentine's day cards they wanted to send out, and pair them up with each other.
Pairings were not bi-directional.
There was some noise thrown in as well to add to the magic.