SP21360 SUFEQPRE - Suffix Equal Prefix

Description

There is a curious boy in noapara village , his name is “MODON”. He wrote a line of small letters only. Now, he want to know how many proper suffix is also prefix of that line. Proper suffix is a suffix of a text whose length is less than the original text Now you have to help “MODON”. Input Input starts with an integer **T (, denoting the number of test cases.** Each case contains a string **S** where 1 **.**

Input Format

N/A

Output Format

For each case, print the case number and the answer .