{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"There is a string A. The length of A is less than 1,000,000. I rewrite it again and again. Then I got a new string: AAAAAA...... Now I cut it from two different position and get a new string B. Then, give you the string B, can you tell me the length of the shortest possible string A.\n\u003cbr\u003e\n For example, A\u003d\"abcdefg\". I got abcd\u003cb\u003e\u003cfont color\u003d\"red\"\u003eefgabcdefgabcde\u003c/font\u003e\u003c/b\u003efgabcdefg.... Then I cut the red part: efgabcdefgabcde as string B. From B, you should find out the shortest A.\n\u003cbr\u003e\n\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Multiply Test Cases.\n\u003cbr\u003e\n For each line there is a string B which contains only lowercase and uppercase charactors.\n\u003cbr\u003e\n The length of B is no more than 1,000,000.\n\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each line, output an integer, as described above."}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003ebcabcab\r\nefgabcdefgabcde\r\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e3\r\n7\r\n\u003c/pre\u003e"}}]}