i want to take the next input but the program runs just once and the while loop doesn't terminate leading to runtime exceed(I have mentioned in the code where i am terminating the while loop)

k>1 always and the elif condition isn't becoming an infy loop rather the code is executing perfect for just 1 input

```
for _ in range(int(input())):
  k=int(input())
  b=2
  c=0
  i=1
  while i>0:
    if k>=2:
      k-=b
      b+=3
    elif k<0:
      b-=3
      k+=b
      c+=1
    else:
      c+=1
      i=0     {#here i am trying to make i=0 and terminate the while loop and take the next input}
  print(c)

```