tle in YVNUM

my way of approach is that i take the input and append to a list initially. Then i take each char from beginning of the initial string and add it to the end. finally joining all the strings of the list and compute its modulo at the end.
kindly check where the mistake is ,and tell me if i am wrong.

[https://www.codechef.com/viewsolution/22082922][1]

thanks in advance.
[1]: https://www.codechef.com/viewsolution/22082922