In an undirected graph, a sequence of consecutive edges. Each edge in the sequence has one endpoint in common with the previous edge and the other endpoint is shared with the next edge.

The number of edges in a chain determines the

**length of the chain**. The length of the chain is called the order of the chain.The diameter of the graph is the length of the longest chain.

### Example

This graph is of the order 6.