Rating:
The program gave us the first and last part:

The middle part is what we had to find.
It was being tested here:

Converted each if block to this:

And then just checking the flag gave us the middle part.

I don't remember