If I’m not mistaken, a layer has a ParentLayerId member (at least in RhinoCommon it does http://4.rhino3d.com/5/rhinocommon/html/P_Rhino_DocObjects_Layer_ParentLayerId.htm).
Also, I don’t know if you can get the full layer name, that should be something like
B-parent::c-child (with double colon in between)
If your layer name itself does not contain a double colon (which is possible) you could split the name at the double colon and get the layer hierarchy like that.