Solution for stringscramble problem.