This solution for “the rise and fall of power (in practice(easy))” is showing NZEC error. though it runs fine in IDLE . Please help.

```
def main():
t=input()
for i in range(int(t)):
n,k=input().split()
pwr(n,k)
def pwr(n,k):
s=int(n)**int(n)
b=str(s)
for i in range(int(k)):
print(b[i],end="")
print(" ",end="")
for i in range(int(k),0,-1):
print(b[-i],end="")
print()
if _name__=="__main_":main()
```