On Ladders and Pyramids: Hierarchy's Shape Determines Relationships and Performance in Groups