If the movement is towards right , then we move right . The start variable and mark that position as visited if not visited previously else we break out
else : NEW_LINE INDENT if mark [ start ] == 0 : NEW_LINE INDENT mark [ start ] = 1 NEW_LINE start += a [ start ] NEW_LINE DEDENT DEDENT