Given a string S , write a program to check if all the characters of the string are same or not.
The first line of input contains a single integer T which denotes the number of test cases. Then T test cases follows. First line of each test case contains a string S.
For each test case print "YES" without quotes if all the characters of the string S are same otherwise print "NO".
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.