shī bài ér gào zhōng

  1. to succeed through failure
  2. to achieve one's final aim despite apparent setback