Playing _with _cards(in stack)

On submission 2/3 test cases are getting wrong_answer. I’m not able to figure out the mistake.

hey @sayedwajahatullah1234, your code is giving answer in wrong order for large testcases. Check your prime seive once.