Eulerian path
In graph theory, an Eulerian trail is a trail in a finite graph that visits every edge exactly once. Similarly, an Eulerian circuit or Eulerian cycle is an Eulerian trail that starts and ends on the same vertex. They were first discussed by Leonhard Euler while solving the famous Seven Bridges of Königsberg problem in 1736. The problem can be stated mathematically like this:Given the graph in the image, is it possible to construct a path that visits each edge exactly once?
https://en.wikipedia.org/wiki/Eulerian_path