PALIN.cs solution.

It's easy problem but took some time to figure out the correct boundaries