题目链接：UVA455「Periodic Strings」 。
A character string is said to have period if it can be formed by concatenating one or more repetitions of another string of length . For example, the string
abcabcabcabc has period , since it is formed by repetitions of the string
abc. It also has periods (two repetitions of
abcabc) and (one repetition of
Write a program to read a character string and determine its smallest period.
The first line of the input file will contain a single integer indicating how many test case that your program will test followed by a blank line. Each test case will contain a single character string of up to non-blank characters. Two consecutive input will separated by a blank line.
An integer denoting the smallest period of the input string for each input. Two consecutive output are separated by a blank line.