BETA

School Problem's Submission isn't counted in score!

Total Submissions: 3122 Accuracy:

28.57%

Check String
     

Given a string S , write a program to check if all the characters of the string are same or not.

Input:
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.

Output:
For each test case print "YES" without quotes if all the characters of the string S are same otherwise print "NO".

Constraints:
1<=T<=100
1<=length(S)<=104

Example:
Input:

2
geeks
gggg
Output:
NO
YES

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Harsh Agarwal

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.