Problemas
The cows are experimenting with secret codes, and have devised a method for creating an infinite-length string to be used as part of one of their codes.
Given a string
Given the initial string and an index
Problem credits: Brian Dean
Entrada
The input consists of a single line containing a string followed by
Note that
Salida
Please output the
Ejemplo
COW 8
C
In this example, the initial string COW expands as follows:
COW -> COWWCO -> COWWCOOCOWWC
12345678