Hi Chefs,

I am not able to find the mistake in below python code, please help me.

Problem statement : https://www.hackerrank.com/challenges/weighted-uniform-string/problem

```
s = input()
weights = {"a":1, "b":2, "c":3, "d":4, "e":5, "f":6, "g":7, "h":8, "i":9, "j":10, "k":11, "l":12, "m":13, "n":14, "o":15, "p":16, "q":17, "r":18, "s":19, "t":20, "u":21, "v":22, "w":23, "x":24, "y":25, "z":26}
ws = []
for i in range(len(s)):
if i == 0 and s[i] in weights:
ws.append(weights[s[i]])
continue
if s[i]==s[i-1]:
ws.append(ws[i-1]+weights[s[i]])
else:
ws.append(weights[s[i]])
n = int(input())
j = 0
found = -1
k = 0
while k<n:
i=int(input())
if j>=len(ws):
print("No")
while j<len(ws):
#print(i,ws[j],j)
if i==ws[j]:
print("Yes")
found=j
j+=1
break
if j==len(ws)-1 and found==-1:
j=0
print("No")
break
elif j==len(ws)-1 and found!=0:
j=found
print("No")
break
else :
j+=1
continue
k+=1
```