In a directed graph, a sequence of consecutive arcs. Every arc in the sequence has one endpoint in common with the previous arc and the other endpoint with the next arc.

The number of arcs in a path determines the

**length of the path**.The longest path in a directed graph is the diameter of this graph.

### Example

In the directed graph below, the path formed in the order by the arcs *a*, *c*, *f*, *d*, *c*, *f*, *g*, and *h* is a **path of length** 8.