[Community puzzle] Misère Nim

This topic is about the puzzle Misère Nim.

Feel free to send your feedback or ask some help here!

Faced with issue in “Hard” test case - it passed in IDE but not passed on server . Can you provide several test cases like “Hard”?

Perhaps, it reaches the execution timeout.
Do you have many loops (nested?) in your solution?