You are given a string 'STR' of length 'N'. You need to return a string that will contain all the characters present at the prime indices of the original string. The relative order of characters in the new string should be exactly the same as it was in the original string.
Note:
1. Prime indices are those indices that are prime numbers i.e. all the numbers except 0 and 1 which are divisible by 1 and the number itself. For eg. If a character is at index 5 in some string, then it is at a prime index, as 5 is a prime number.
2. The given string may consist of characters ‘a’-’z’, ‘A’-’Z’, ‘0’-’9’ at any place.
3. The given string follows 0-based indexing. So, assume that the first character of the given string is at index 0.
Input Format:
The first line of the input contains an integer 'T' denoting the number of test cases.
The first and the only line of each test case contains the string 'STR'.
Output Format:
The only line of output of each test case should contain the string consisting of characters at prime indices in the given string.
Note:
You do not need to print anything, it has already been taken care of. Just implement the given function.
Constraints:
1 <= T <= 50
1 <= N <= 10^4
Time Limit: 1 sec