https://mycode.prepbytes.com/problems/fundamentals/JUGGLER

this is the problem, I want output the same but didn’t get it.

please help me to find out.

Thanks

```
from math import *
T = int(input())
while (T>0):
n = int(input())
a = n
print(a)
while (a!=1):
b=0
if a%2==0:
b = sqrt(a)
b = int(b)
else:
b = sqrt(a)*sqrt(a)*sqrt(a)
b = int(b)
print(b,end=" ")
a=b
T=T-1
```

Source: Python-3x Questions