That’s easy via code (but I’m not in the practice right now). Keep in mind that a C# based solution would be a black box for you.
General strategy: do graph’s VV connectivity (since you claim that (1) there’s no islands, (2) you don’t have a Graph Tree to resolve, (3) you are sure that your Graph is OK … you can safely use Sandbox) and for each node with valence 1 (and marked as a dead-end start [or end]) recursively search for an adjacent one that has valence >= 3.
If on the other hand you want to mark the nodes interactively … that requires some lines of code more (storing volatile data in a parameter and prior the next search input these etc etc).
So the only thing that matters (in real-life) in this case is the way that you mark the desired valence 1 nodes.
I have marked them in above attached definition. As you mentioned with Sandbox and ClosestPoint pairing. Initial nodes are always of valence 1. I have indexes of nodes but cannot implement recursiveness succesfully.
Let it be a black box. But not for ever. Eventually i will learn scripting.