subgraph border both end