The emergence of lines of hierarchy in collective motion of biological systems