Adding simple (slow) solution to p10.py