I mostly shy away from nested comprehensions for readability, but putting it all together seems cool. I'll give it a shot.