A grid of unit cells is given. A snake of length is an animal which occupies an ordered -tuple of cells in this grid, say . These cells must be pairwise distinct, and and must share a side for . After being placed in a finite grid, if the snake is currently occupying and is an unoccupied cell sharing a side with , the snake can move to occupy instead. The snake has turned around if it occupied at the beginning, but after a finite number of moves occupies instead.
Find the largest integer such that one can place some snake of length in a grid which can turn around.