Select tangent faces of a Brep?

I’m looking into graph theory to solve this problem.
Here is a tree (for Brep N°38) giving, for each face which has tangent neighbours, the list of those neighbours (including itself).
For example, list {38;13} says that face 13 is tangent to face 20 and 18.
If you plot a graph of all the faces (13, and 17 to 25), the two “chains” of tangentially connected faces appear as graph paths of a disjoint graph.

I was wondering if there was a graph plugin for GH, or how I could turn this in to an adjacency matrix and extract the two paths from there.