0249: Group Shifted Strings

Problem Statement