Construct Array getting Wrong Answer

I used matrix exponentiation , but getting WA Code . Can you please help me in debugging. I’m not able to find it.