solution p28.py