Luck, skill, and depth of competition in games and social hierarchies