{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cstyle type\u003d\"text/css\"\u003e pre { text-align:left; font-family: \"Courier New\", Courier, monospace; font-size: 16px; white-space: pre; line-height:20px; text-indent: 0px; }\u003c/style\u003e\u003cdiv class\u003d\"pro_desc\"\u003e\n For each prefix with length P of a given string S,if \n \u003cp\u003eS[i]\u003dS[i+P] for i in [0..SIZE(S)-p-1], \u003c/p\u003e\n \u003cp\u003ethen the prefix is a “period” of S. We want to all the periodic prefixs. \u003c/p\u003e\n\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cdiv class\u003d\"pro_desc\"\u003e\n Input contains multiple cases. \n \u003cp\u003eThe first line contains an integer T representing the number of cases. Then following T cases. \u003c/p\u003e\n \u003cp\u003eEach test case contains a string S (1 \u0026lt;\u003d SIZE(S) \u0026lt;\u003d 1000000),represents the title.S consists of lowercase ,uppercase letter. \u003c/p\u003e\n\u003c/div\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"pro_desc\"\u003e\n For each test case, first output one line containing \"Case #x: y\", where x is the case number (starting from 1) and y is the number of periodic prefixs.Then output the lengths of the periodic prefixs in ascending order.\n\u003c/div\u003e"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e4\r\nooo\r\nacmacmacmacmacma\r\nfzufzufzuf\r\nstostootssto\r\n\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003eCase #1: 3\r\n1 2 3\r\nCase #2: 6\r\n3 6 9 12 15 16\r\nCase #3: 4\r\n3 6 9 10\r\nCase #4: 2\r\n9 12\r\n\u003c/pre\u003e"}}]}