Example:
Suppose we have 3 cities with adjacency matrix:
$A = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ 0 & 0 & 0 \end{bmatrix}$
This means: City 1 → City 2 City 2 → City 3
Compute $A^2$: