Given a string S, the task is to check if we can split it into 4 string such that each string is non-empty and different from each other.
Input : S = "geeksforgeeks" Output : 1 "geeks", "for", "gee", "ks" are four distinct strings that can form from given string. Input : S = "aaabb" Output : 0
The first line of input contains an integer T denoting the no of test cases. Then T test cases follow. Each test case contains a string S.
For each test case in a new line print 1 if the string could be splitted else print a 0.
1< |S| <=1000