Fixes #779 : sorting fathers before printing

I think this will fix #779 

It works for me but need further reviewing 

My Python is not good !!