Nim

Alice and Bob are playing the following game:

  • There are 5 piles of coins with 5, 8, 6, 10, and 7 coins in each pile, respectively.
  • Alice and Bob take turns selecting “one pile” and remove coins from it. However, they must take 1, 3, or 4 coins from the chosen pile.
  • The player who takes the last coin wins.
  • Both players play optimally.

If Alice goes first, who will win?