Plan Ahead from inverted lines