Solves the destructive testing problem