Solve GameOfStones