extract local rotation X,Y,Z from Biped

Hello Guys.

I have created an animation with biped and I want to extract local rotation in XYZ directions from upper arms, head, lower arms etc. in biped skeleton. so I need scripts to do that. Please help me to extract these data.

Thank you.