Two magicians are performing the following game. Initially the first magician encloses the second magician in a cabin where he can neither see nor hear anything. To start the game, the first magician invites Daniel, from the audience, to put on each square of a chessboard $n \times n$, at his (Daniel's) discretion, a token black or white. Then the first magician asks Daniel to show him a square $C$ of his own choice. At this point, the first magician chooses a square $D$ (not necessarily different from $C$) and replaces the token that is on $D$ with other color token (white with black or black with white). 
Then he opens the cabin in which the second magician was held. Looking at the chessboard, the second magician guesses what is the square $C$. For what value of $n$, the two magicians have a strategy such that the second magician makes a successful guess.
To solve this problem, we need to determine for which values of \( n \) the two magicians can devise a strategy such that the second magician can always correctly identify the square \( C \) chosen by Daniel. 

1. **Understanding the Problem:**
   - We have an \( n \times n \) chessboard.
   - Daniel places a black or white token on each square.
   - Daniel then shows the first magician a square \( C \).
   - The first magician changes the color of the token on a square \( D \) (which could be the same as \( C \) or different).
   - The second magician, upon seeing the modified board, must identify the square \( C \).

2. **Key Insight:**
   - The first magician needs to encode the information about the square \( C \) in the change he makes to the board.
   - The second magician must decode this information from the modified board.

3. **Encoding Strategy:**
   - One effective way to encode information is through the use of parity (even or odd sums).
   - Consider the sum of the positions of the squares. Each square can be represented by coordinates \((i, j)\) where \(1 \leq i, j \leq n\).

4. **Parity Calculation:**
   - Calculate the parity (even or odd) of the sum of the coordinates of all black tokens on the board.
   - Let \( S \) be the sum of the coordinates of all black tokens.
   - When the first magician is shown square \( C \), he calculates the parity of \( S \) and the coordinates of \( C \).

5. **Choosing Square \( D \):**
   - The first magician chooses \( D \) such that flipping the token at \( D \) changes the parity of the sum \( S \) to match the parity of \( C \).
   - This ensures that the second magician can determine \( C \) by comparing the parity of the modified board with the original parity.

6. **Decoding Strategy:**
   - The second magician calculates the parity of the sum of the coordinates of all black tokens on the modified board.
   - The difference in parity will point to the coordinates of \( C \).

7. **Feasibility for Different \( n \):**
   - This strategy works for any \( n \) because parity is a binary property (even or odd) and can always be matched by flipping a single token.

Conclusion:
The strategy described above works for any \( n \). Therefore, the two magicians can always successfully guess the square \( C \) for any size \( n \times n \) chessboard.

The final answer is \( \boxed{ n } \) can be any positive integer.