[Winning and Losing Positions] Nim-sum $\quad]$

a) There are 111 matches on the table. Masha and Dasha take turns picking up several matches, but no more than ten at a time. The one who takes the last match wins. Who will win with correct play?

b) On the floor lie three piles - of 3, 4, and 5 matches. Now Masha and Dasha can take any number of matches, but only from one pile at a time. Who will win this time?
a) Masha will win. For this, she needs to take one match on her first move, and with each subsequent move, leave a number of matches on the table that is a multiple of eleven.

b) Masha will win again. On her first move, she should take two matches from the pile with three matches (with any other first move, Dasha will be able to win). It is not difficult to verify that in this case, regardless of Dasha's actions, Masha will win. (See also problem 60915.)

## Answer

a) Masha;

b) Masha.