Baseline Python Solution

A baseline python solution would be highly appreciated!

Thanks

In case anyone else is following this question.

It has been answered by organisers here: