Find a word in a letter grid

grid is a list of strings of letters. Write exists(grid, word) that returns whether word can be traced through adjacent cells (up, down, left, right), using each cell at most once.

grid = ["ABCE", "SFCS", "ADEE"]
exists(grid, "ABCCED")  ->  True
exists(grid, "SEE")     ->  True
exists(grid, "ABCB")    ->  False

The point is to practise backtracking on a grid with a visited set that is undone.

def exists(grid, word):
    ...