Very nice. It took me a while to see why that works, so I wonder how long it would have taken me to come up with it.
Now that I get it, it seems almost obvious. It's basically the same as my solution, except I'm essentially using this technique on 50 separate lines of 2 people each.