rohan's submission of K - Magical String | CodeChef