Organization Tree traversal using Uipath

I have a website with we can search with names of an organization and have to save the basic info to file.

Eg: Image attached.

If we search with A → has 2 sub level - B & C, Now After saving the basic details of A, we need to search with B and then get if B has any sub level. If yes, then do searching of those all sub levels and then come back to parent B’s same level next item. If B dont have any subleel, then move to C for same process.

Can you please suggest a way to implement this using Uipath?