Chef Tobby is playing a rapid fire with Bhuvan. He gives Bhuvan a string S and each time, Bhuvan has to guess whether there exists 2 equal subsequences in the string or not.
Bhuvan got a perfect score in the game with Chef Tobby. However, Chef Tobby has now asked Bhuvan to write a program that will do this automatically given a string S. Bhuvan is an intelligent man but he does not know how to write a code. Can you help him?
Find two different subsequences such that they are equal in their value, more formally, find two sequences of indices (a1, a2, ..., ak-1, ak) and (b1, b2, ..., bk-1, bk) such that:

- 1≤ ai, bi ≤ |S|
- ai < ai+1 for all valid i
- bi < bi+1 for all valid i
- Sai = Sbi for all valid i
- there exist at least one i such that ai is not equal to bi

-----Input section-----
The first line contains T, the number of test cases.
Each of the next T lines contain one string S each.
Input will only consist of lowercase english characters

-----Output section-----
For each test case, output "yes" or "no" (without quotes) as the solution to the problem.

-----Input constraints-----
1 ≤ T ≤ 1000
1 ≤ length of S ≤ 100

-----Sample Input-----
4
likecs
venivedivici
bhuvan
codechef

-----Sample Output-----
no
yes
no
yes

-----Explanation-----
In test case 2, one of the possible equal subsequence is "vi" and "vi". (one at position {0, 3} and other at {4, 7}, assuming 0-based indexing).
In test case 4, one of the possible equal subsequence is "ce" and "ce". (one at position {0, 3} and other at {4, 6}, assuming 0-based indexing).

Starter code:

Solutions:
t = int(input())

for _ in range(t):
 s = [x for x in input()]
 
 freq = {}
 
 for i in s:
  if i in freq:
   freq[i] += 1
  else:
   freq[i] = 1
 
 flag = 0
 
 for keys, values in freq.items():
  if(values >= 2):
   flag = 1
   break
 
 if(flag == 0):
  print("no")
 else:
  print("yes")

t = int(input())

for _ in range(t):
 s = [x for x in input()]
 
 freq = {}
 
 for i in s:
  if i in freq:
   freq[i] += 1
  else:
   freq[i] = 1
 
 flag = 0
 
 for keys, values in freq.items():
  if(values >= 2):
   flag = 1
   break
 
 if(flag == 0):
  print("no")
 else:
  print("yes")

for _ in range(int(input())):
 S = input()
 set_S = list(set(list(S)))
 flag = False
 
 for s in set_S:
  if S.count(s) > 1:
   flag = True
   break
 
 print("yes" if flag else "no")

for _ in range(int(input())) :
 s = input()
 if len(set(s)) == len(s) :
  print('no')
 else :
  print('yes')

for _ in range(int(input())):
 S = input()
 for i in list(set(S)):
  if S.count(i) > 1:
   print('yes')
   break
 else:
  print('no')

# cook your dish here
for _ in range(int(input())):
 s=input()
 flag=0
 for i in range(len(s)):
  if s.count(s[i]) > 1:
   flag=1
   break
 if flag==1:
  print('yes')
 else:
  print('no')

t=int(input())
for i in range(t):
 s=input()
 list1=[]
 flag=0
 for i in range(len(s)):
  list1.append(s[i])
 set1=set(list1)
 dict1=dict()
 for i in set1:
  dict1[i]=0
 for i in list1:
  dict1[i]+=1
  if(dict1[i]>1):
   print("yes")
   flag=1
   break
 if(flag==0):
  print("no")
   


T=int(input())

while(T>0):
 s=input();
 flg=0;
 for i in range(len(s)-1):
  if(s.find(s[i],i+1)!=-1):
   flg=1;
 if(flg==0):
  print("no");
 else:
  print("yes");
 

 T=T-1


def check(h):
 for n in h:
  if n > 1:
   return "yes"
 return "no"
  

for _ in range(int(input())):
 s = input()
 h = [0]*26
 
 for c in s:
  h[ord(c)-ord('a')] += 1
 
 print(check(h))

# cook your dish here
for h in range(int(input())):
 s = input()
 if len(s)!=len(set(s)):
  print('yes')
 else:
  print('no')

t=int(input())
for i in range(t):
 s=input()
 n=len(s)
 c=0
 if n!=len(set(s)):
  print('yes')
 else:
  print('no')

def Cook(S):
 Counter = dict()
 for i in S:
  if i not in Counter.keys():
   Counter[i] = 0
  Counter[i] += 1
 for i in Counter.values():
  if i > 1:
   return "yes"
 return "no"

for T in range(int(input())):
 S = input()
 print(Cook(S))

def Cook(S):
 Counter = dict()
 for i in S:
  if i not in Counter.keys():
   Counter[i] = 0
  Counter[i] += 1
 for i in Counter.values():
  if i > 1:
   return "yes"
 return "no"

for T in range(int(input())):
 S = input()
 print(Cook(S))

t=int(input())
for i in range(t):
 s=input()
 l=[0 for i in range(26)]
 for j in range(len(s)):
  l[ord(s[j])-97]+=1
 f=0
 for j in range(26):
  if l[j]>1:
   f=1
   break
 if f==1:
  print("yes")
 else:
  print("no")

# cook your dish here
for h in range(int(input())):
 s=input();
 l=list(s)
 s1=set(s)
 if(len(s1)==len(l)):
  print('no')
 else:
  print('yes')


# cook your dish here
try:
 for _ in range(int(input())):
  s=input()
  l1=len(s)
  l2=len(set(s))
  if l1!=l2:
   print('yes')
  else:
   print('no')
except:
 pass

# cook your dish here
for i in range(int(input())):
 s=input()
 s1=set(s)
 l=[]
 for j in s1:
  l.append(s.count(j))
 if(max(l)>=2):
  print('yes')
 else:
  print('no')


for _ in range(int(input())):
 s=input()
 l1=len(s)
 l2=len(set(s))
 if l1!=l2:
  print('yes')
 else:
  print('no')

# cook your dish here
# cook your dish here
t=int(input())
for i in range(t):
 s=input()
 ans=1
 for j in s:
  if(s.count(j)>1):
   ans=0
   break
 if(ans==0):
  print("yes")
 else:
  print("no")


# cook your dish here
t=int(input())
for i in range(t):
 s=input()
 ans=1
 for j in s:
  if(s.count(j)>1):
   ans=0
   break
 if(ans==0):
  print("yes")
 else:
  print("no")


# cook your dish here
t=int(input())
for i in range(t):
 s=input()
 ans=1
 for j in s:
  if(s.count(j)>1):
   ans=0
   break
 if(ans==0):
  print("yes")
 else:
  print("no")


# cook your dish here
for _ in range(int(input())):
 s = list(input())
 letters = set()
 flag = False
 for letter in s:
  if letter not in letters:
   letters.add(letter)
  else:
   flag = True
   break
 
 if flag:
  print("yes")
 else:
  print("no")

t = int(input())
for i in range(t):
 a = input()
 b = list(a)
 c = 0
 for i in b:
  if a.count(i) > 1:
   c = c + 1
 if c >= 1:
  print("yes")
 else:
  print("no")