{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek the name, and at the same time seek the fame. In order to escape from such boring job, the innovative little cat works out an easy but fantastic algorithm:\r\u003cbr\u003e\r\u003cbr\u003eStep1. Connect the father\u0027s name and the mother\u0027s name, to a new string S.\r\u003cbr\u003eStep2. Find a proper prefix-suffix string of S (which is not only the prefix, but also the suffix of S).\r\u003cbr\u003e\r\u003cbr\u003eExample: Father\u003d\u0027ala\u0027, Mother\u003d\u0027la\u0027, we have S \u003d \u0027ala\u0027+\u0027la\u0027 \u003d \u0027alala\u0027. Potential prefix-suffix strings of S are {\u0027a\u0027, \u0027ala\u0027, \u0027alala\u0027}. Given the string S, could you help the little cat to write a program to calculate the length of possible prefix-suffix strings of S? (He might thank you by giving your baby a name:)\r\u003cbr\u003e"}},{"title":"Input","value":{"format":"HTML","content":"The input contains a number of test cases. Each test case occupies a single line that contains the string S described above.\r\u003cbr\u003e\r\u003cbr\u003eRestrictions: Only lowercase letters may appear in the input. 1 \u0026lt;\u003d Length of S \u0026lt;\u003d 400000.\r\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output a single line with integer numbers in increasing order, denoting the possible length of the new baby\u0027s name."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003eababcababababcabab\r\naaaaa\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2 4 9 18\r\n1 2 3 4 5\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}