Three players $A, B$ and $C$ take turns taking stones from a pile of $N$ stones. They play in the order $A$, $B$, $C$, $A$, $B$, $C$, $....$, $A$ starts the game and the one who takes the last stone loses. Players $A$ and $C$ They form a team against $B$, they agree on a strategy joint. $B$ can take $1, 2, 3, 4$ or $5$ stones on each move, while that $A$ and $C$ can each draw $1, 2$ or $3$ stones in each turn. Determine for which values of $N$ have winning strategies $A$ and $C$ , and for what values the winning strategy is $B$'s.