Dan and Sam play a game on a $5\times5\times5$ cube that consists of 125 objects; each one must take at least one object and at most a whole heap, in his turn.

As an explicit example, in the first turn, Dan can take just the bottom front left corner object, or the whole vertical central heap, or the whole bottom front horizontal heap. Thus, he can take any number of objects of one of the 125 initial heaps (heaps cannot be diagonals).

The winner is the one who takes the last object. If Dan begins, who will win? This means, who has a winning strategy?

This is the fifteenth problem of the set Winning Strategies .

Neither
Dan
Sam
Both

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

As the length of the cube dimensions are odd, the cube presents simmetry with respect to its central object. Dan just has to take this object in his first turn, and then, every time Sam takes some objects from a heap, Dan takes the same ammount of objects from the heap that is 180 away (rotating about the middle object). If Sam's move is possible, then also Dan's, so Dan wins.

Bonus:It would be more complicated if the cube dimensions are different.