How to beat the lab?

I've never been able to win it