Another still-too-slow sequence transformation solution.

Still needs work.