solution p13.py