Given is a piece at the origin of the coordinate plane. Two persons $A,\ B$ act as following.
First, $A$ marks on a lattice point, on which the piece cannot be anymore put. Then $B$ moves the piece from the point $(x,\ y)$ to the point $(x+1,\ y)$ or $(x,\ y+1)$, a number of $m$ times $(1\leq m\leq k)$. Note that we may not move the piece to a marked point. If $A$ wins when $B$ can't move any pieces, then find all possible integers $k$ such that $A$ will win in a finite number of moves, regardless of how $B$ moves the piece.
1. **Understanding the Problem:**
   - We have two players, \(A\) and \(B\), playing on a coordinate plane.
   - \(A\) marks lattice points where \(B\) cannot move.
   - \(B\) moves a piece from \((x, y)\) to \((x+1, y)\) or \((x, y+1)\) up to \(m\) times (\(1 \leq m \leq k\)).
   - \(A\) wins if \(B\) cannot move the piece anymore.

2. **Relating to the Angel Problem:**
   - This problem is a variant of Conway's Angel Problem.
   - Differences:
     - The angel (player \(B\)) can only move up or right.
     - The angel cannot move over marked squares.
     - The angel can move any number of times between 1 and \(k\).

3. **Strategy for Player \(A\) (Devil):**
   - The strategy involves marking points in such a way that \(B\) (the angel) is eventually trapped.
   - The key is to understand that the angel's movement is restricted to the first quadrant and cannot move left or down.

4. **Proof Outline:**
   - **Step 1:** Define the "upward cone" from any point \(P\) where the angel is located. The boundary of this cone is defined by the lines with slopes \(\pm \frac{1}{k}\) through \(P\).
   - **Step 2:** \(A\) (the devil) should truncate this cone by a horizontal line \(AB\) at a large height \(H\) above the starting position.
   - **Step 3:** \(A\) marks one out of every \(M\) squares along \(AB\), where \(M\) is chosen so that this task is completed before the angel reaches halfway to \(AB\).
   - **Step 4:** As the angel moves up, \(A\) continues marking squares in a similar fashion, ensuring that the angel is always confined within a smaller cone.
   - **Step 5:** By the time the angel reaches a certain height, \(A\) will have marked all squares that the angel could potentially reach, thus trapping the angel.

5. **Detailed Steps:**
   - **Initial Setup:** Let the angel start at the origin \((0,0)\).
   - **Marking Strategy:** 
     - Choose a large height \(H\) and mark one out of every \(M\) squares along the line \(y = H\).
     - When the angel reaches halfway to \(H\), mark the second out of every \(M\) squares along the line \(y = \frac{H}{2}\).
     - Continue this process, halving the height each time and marking the next set of squares.
   - **Ensuring Trapping:** 
     - By choosing \(H\) as a multiple of \(k \times 2^N\) where \(N > kM\), ensure that all reachable squares are marked before the angel can reach them.

6. **Conclusion:**
   - The strategy ensures that the angel is eventually trapped within a finite number of moves, regardless of how the angel moves.
   - Therefore, \(A\) (the devil) has a winning strategy for any positive integer \(k\).

The final answer is any positive integer \( \boxed{ k } \).