Given a String(only lower case letters) , check if any substring has occured Twice :

 Example : iwsagoodboody
Here, substring  "ood" occurs twice.

Output "YES"  if there is any such substring else output "NO" .(without qoutes)

Input:

First line of input consists of an integer T (1 ≤ T ≤ 100) ,  indicating the number of test cases. 
For each test case, there will be a string s (1 ≤ |s| ≤ 2000)

Output:
    Print "YES"  if there is any such substring else Print "NO" .(without quotes)

SAMPLE INPUT
3
abcdefghi
dogsbarkatdogs
howtheydo

SAMPLE OUTPUT
NO
YES
YES
t=input()
while t:
	t-=1
	s = raw_input()
	l = len(s)
	fnd = False
	for x in range(0,l):
		for y in range(x,l):
			ss = s[x:y+1]
			s1 = s[y+1:l]
			r1 = s1.find(ss)
			if r1 >= 0:
				fnd = True
				print("YES")
				break
		if fnd:
			break	
	if not fnd:
		print("NO")