Process String with Special Operations II
Compute lengths forward, then trace the k-th position back through the operations without building the string.
Compute lengths forward, then trace the k-th position back through the operations without building the string.