

The first line of input contains an integer ‘T’ denoting the number of test cases.
The next ‘T’ lines represent the ‘T’ test cases.
The first line of each test case contains a string ‘S’ for which we need to find if a given string is periodic or not
For each test case, return true if the given string is periodic and return false if the given string is not periodic.
Output for each test case must be in a separate line.
You do not need to print anything, it has already been taken care of. Just implement the given function.
1 <= T <= 50
1<= S.length<=10^5
Where 'S.length' denotes the length of string ‘S’.
The given string consists of lowercase English alphabets only.
Time limit: 1 sec
Keeping the above example in mind, we can write the following solution:
Keeping in mind the above idea, we can use the following approach: