def neighbors(board, i, j):
    """
    Return a list of the contents of the four neighboring squares
    in the order N, S, E, W. 
    """
    return [board[j-1][i], board[j+1][i], 
            board[j][i+1], board[j][i-1]]