UI design when root and child nodes are reused

Imagine I have structure where root and child nodes are same but intermediate nodes are different. Each node represents one data class with multiple attributes.

Flow 1

XY
-Y
--YY
----XYZ

Flow2

XY
-X
--XX
---XYZ

I want to design a user interface in such a way that user can start with Flow 1 from top to bottom i.e. XY to XYZ and reuse XYZ in flow 2 and complete it from bottom to top i.e. from XYZ to X (XY is not required as it was already created in flow 1). Or User first completes the flow 2 from top to down and complete flow 1 from bottom to top. I want to provide a flexibility to the user to follow any flow.