How Failure Shapes Success